QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#728481 | #9381. 502 Bad Gateway | lylmeichichi# | WA | 101ms | 3696kb | C++14 | 714b | 2024-11-09 15:15:50 | 2024-11-09 15:15:59 |
Judging History
answer
//From: ifffer_2137
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define inf 0x7fffffff
#define eb emplace_back
#define pii pair<int,int>
#define mkpr make_pair
#define fir first
#define sec second
inline int read(){
char ch=getchar();int x=0,w=1;
while(ch<'0'||ch>'9'){if(ch=='-')w=-1;ch=getchar();}
while(ch>='0'&&ch<='9')x=(x<<1)+(x<<3)+ch-48,ch=getchar();return w==1?x:-x;
}
const int maxn=2e5+5;
int _;
int T;
signed main(){
#ifndef ONLINE_JUDGE
assert(freopen("data.in","r",stdin));
assert(freopen("test.out","w",stdout));
#endif
_=read();
while(_--){
T=read();
int a=(T+1)*T/2,b=T,g=__gcd(a,b);
cout<<a/g<<' '<<b/g<<'\n';
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3696kb
input:
3 1 2 3
output:
1 1 3 2 2 1
result:
ok 3 lines
Test #2:
score: -100
Wrong Answer
time: 101ms
memory: 3680kb
input:
1000000 1 1000000000 1 1 1000000000 1 1000000000 1 1 1 1000000000 1 1 1000000000 1 1000000000 1000000000 1 1000000000 1 1 1000000000 1 1000000000 1000000000 1 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1 1 1000000000 1 1000000000 1000000000 1000000000 1000000000 1 1 1 10000000...
output:
1 1 1000000001 2 1 1 1 1 1000000001 2 1 1 1000000001 2 1 1 1 1 1 1 1000000001 2 1 1 1 1 1000000001 2 1 1 1000000001 2 1000000001 2 1 1 1000000001 2 1 1 1 1 1000000001 2 1 1 1000000001 2 1000000001 2 1 1 1000000001 2 1000000001 2 1000000001 2 1000000001 2 1000000001 2 1000000001 2 1 1 1 1 1000000001 ...
result:
wrong answer 2nd lines differ - expected: '1999961560 44721', found: '1000000001 2'