郑震云 • 5个月前
int main() {
int a, b, c, d, e, f, g, h, n, s, z;
scanf("%d", &n);
a = n / 20;
if (a != 0) {
z = z + 1;
}
b = n % 20;
c = b / 10;
if (c != 0) {
z = z + 1;
}
d = b % 10;
e = d / 5;
if (e != 0) {
z = z + 1;
}
f = d % 5;
g = f / 1;
if (g != 0) {
z = z + 1;
}
h = f % 1;
s = a + c + e + g ;
printf("%d %d", s, z);
return 0;
}
评论:
请先登录,才能进行评论