Advertisement
Saleh127

Untitled

Apr 20th, 2020
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. int t,a,b,c,d,e,f,i,j,k,l;
  6. cin>>t;
  7. for(i=1;i<=t;i++)
  8. {
  9. cin>>a>>b>>c;
  10. d=b+c;
  11. if(d%a==0)
  12. {
  13. printf("Case %d: %d\n",i,a);
  14. }
  15. else
  16. {
  17. printf("Case %d: %d\n",i,d%a);
  18. }
  19. }
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement