#include <stdio.h> int main() { int t, c=1,n,k,p; scanf("%d",&t); while (t--) { scanf("%d%d%d",&n,&k,&p); k=k+p%n; if (k>n) k=k-n; printf("Case %d: %d\n",c++,k); } return 0; }
Sunday, April 24, 2016
Subscribe to:
Post Comments (Atom)
Coprights @ 2016, Coder Cart
0 comments:
Post a Comment