Saleh127

uva 11805.cpp

Jun 6th, 2020
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define test int t; cin>>t; while (t--)
  4. #define ll long long int
  5. #define Faster ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
  6. #define pi acos(-1)
  7. #define yes printf("YES\n");
  8. #define no printf("NO\n");
  9. #include<bits/stdc++.h>
  10. int main()
  11. {
  12. int t,a,b,c,d,e,f,i,j,k,l;
  13. cin>>t;
  14. for(i=1;i<=t;i++)
  15. {
  16. cin>>a>>b>>c;
  17. d=b+c;
  18. if(d%a==0)
  19. {
  20. printf("Case %d: %d\n",i,a);
  21. }
  22. else
  23. {
  24. printf("Case %d: %d\n",i,d%a);
  25. }
  26. }
  27. return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment