QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#623987 | #9381. 502 Bad Gateway | Patrick_Star | WA | 459ms | 3624kb | C++23 | 300b | 2024-10-09 14:36:11 | 2024-10-09 14:36:11 |
Judging History
answer
#include "bits/stdc++.h"
using namespace std;
int main(){
int n;
cin>>n;
int t;
while(n--){
cin>>t;
long long first = t*(t+1)/2;
long long second = t;
int gcd = __gcd(first,second);
cout<<first/gcd<<" "<<second/gcd<<"\n";
}
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3612kb
input:
3 1 2 3
output:
1 1 3 2 2 1
result:
ok 3 lines
Test #2:
score: -100
Wrong Answer
time: 459ms
memory: 3624kb
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 -950427 3906250 1 1 1 1 -950427 3906250 1 1 -950427 3906250 1 1 1 1 1 1 -950427 3906250 1 1 1 1 -950427 3906250 1 1 -950427 3906250 -950427 3906250 1 1 -950427 3906250 1 1 1 1 -950427 3906250 1 1 -950427 3906250 -950427 3906250 1 1 -950427 3906250 -950427 3906250 -950427 3906250 -950427 3906250 ...
result:
wrong answer 2nd lines differ - expected: '1999961560 44721', found: '-950427 3906250'