80求指点

题目总版

hututu3232 @ 2024-11-09 21:40:39

#include<stdio.h>
int main()
{
    int x,n,s;
    scanf("%d %d", &x, &n);
    int n1 = n / 7;
    int n2 = n % 7;
    if (x + n2 - 1 <= 5)
        s = n1 * 5 * 250 + n2 * 250;
    else if (x + n2 - 1 == 6)
        s = n1 * 5 * 250 + (n2 - 1) * 250;
    else if(x+n2-1==7)
        s = n1 * 5 * 250 + (n2 - 2) * 250;
    printf("%d", s);
    return 0;
}

|