while即可,纯水题
AC代码:
#include <stdio.h>
int main(){
int N;
scanf("%d",&N);
int cnt = 0;
while(N>0){
if(N >= 50){
cnt = cnt + 7;
N = N - 50;
}
else if(N >= 30 && N <50){
cnt = cnt + 4;
N = N - 30;
}
else{
cnt = cnt+1;
N = N - 10;
}
}
printf("%d",cnt);
}