- #include<iostream>
- using namespace std;
- int main ()
- {
- int testCases , N , K , P , position;
- cin>>testCases;
- for(int i = 0 ; i<testCases ; i++)
- {
- cin>>N>>K>>P;
- position = K + P;
- while(position > N)
- {
- position-=N;
- }
- cout<<"Case "<<i+1<<": "<<position<<endl;
- }
- return 0;
- }
You can find more of my solutions on Here
No comments:
Post a Comment