作業
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
-
Blockchain SUpport Phone NUmber
10 min ago
-
Untitled
11 min ago
-
PremiumBukkake - Charlotte Angie swallows 35 huge cumshots
14 min ago
-
Untitled
19 min ago
-
Billionaire Brain Wave Reviews
20 min ago
-
Quantum AI
20 min ago
-
Kanatal Spa Resort | Weekend Getaway in Kanatal
31 min ago
-
c.. p mega working
40 min ago
-
တက်တူးဆရာပေးတဲ့ အပ်ရဲ့ခပ်ဆူးဆူးအရသာလေး
44 min ago
-
https://www.facebook.com/ZenCortexPrice/
46 min ago