第一题:
#include
#include
using namespace std;
int main()
{
int n, cnt1 = 0, cnt2 = 0;
scanf(“%d”,&n);
int x1 = n/50;
x1 > 0 ? n = n – x1 * 50 : x1=0;
int x2 = n / 30;
x2 > 0 ? n = n – x2 * 30 : x2 = 0;
int x3 = n / 10;
int sum = x1 * 7 + + x2 * 4 + x3;
printf(“%d”, sum);
return 0;
}
没什么说的