Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Bismillah*/
- #include<stdio.h>
- int main()
- {
- long long n,a[12],b[12],i,j=1;
- while(scanf("%lld",&n)&&n>=0)
- {
- for(i=0;i<12;i++)
- scanf("%lld",&a[i]);
- for(i=0;i<12;i++)
- scanf("%lld",&b[i]);
- printf("Case %lld:\n",j++);
- for(i=0;i<12;i++)
- {
- if(n>=b[i])
- {
- printf("No problem! :D\n");
- n=n-b[i];
- }
- else
- {
- printf("No problem. :(\n");
- }
- n=n+a[i];
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement