1 条题解
-
0
C++ :
#include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> using namespace std; int main() { int k; scanf ("%d", &k) ; while (k--) { int n, a, b ; scanf("%d%d%d",&n,&a,&b); int t=(a+b)%n; if(t==0) { printf("%d\n",n); continue ; } if(t>=0) printf("%d\n",t); else printf("%d\n",n+t); } return 0; }
- 1
信息
- ID
- 1184
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- (无)
- 标签
- (无)
- 递交数
- 0
- 已通过
- 0
- 上传者