Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int t,j,n,k,p,ans;
- while(scanf("%d",&t)==1)
- {
- for(j=1;j<=t;j++)
- {
- scanf("%d%d%d",&n,&k,&p);
- ans=k+p;
- while(ans>n)
- {
- ans=ans-n;
- }
- printf("Case %d: %d\n",j,ans);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement