作業
Never
#include <stdio.h> #include <stdlib.h> int main(void) { int c[4]={0}; int p=0; int s=0;//硬幣 scanf("%d %d %d %d %d",&p,&c[0],&c[1],&c[2],&c[3]); while (p>=50){ if (c[3]==0) break; else{ c[3]--; p-=50; s++; printf("50:%d p:%d s:%d\n",c[3],p,s); } } while (p>=10){ if (c[2]==0) break; else{ c[2]--; p-=10; s++; printf("10:%d p:%d s:%d\n",c[2],p,s); } } while (p>=5){ if (c[1]==0) break; else{ c[1]--; p-=5; s++; printf("5:%d p:%d s:%d\n",c[1],p,s); } } while (p>=1){ if (c[0]==0) break; else{ c[0]--; p-=1; s+=1; printf("1:%d p:%d s:%d\n",c[0],p,s); } } if(p>0){ printf("-1\n"); } else{ printf("%d\n",s); } return 0; }
Raw Text
-
sdfgndasdfbn adsdfg
6 min ago
-
Untitled
9 min ago
-
UNDER AGE 11YR T
11 min ago
-
REAL PEDQFILI4 T
12 min ago
-
d2play best stream T
12 min ago
-
Look like now and T
13 min ago
-
Look like now and T https://exe.io/C2aeF
14 min ago
-
100 Latestnew Dōods T https://exe.io/xLTdcA
16 min ago
-
Sucked a nerd during the game, the only way to distract him [ENG SUB]
16 min ago
-
Mega folder T
16 min ago