QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#306754 | #7502. Painting the Roads | vavka | WA | 0ms | 3852kb | C++23 | 192b | 2024-01-17 08:32:10 | 2024-01-17 08:32:10 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int T;
int main(){
scanf("%d",&T);
while (T--){
long long n,m;
scanf("%lld%lld",&n,&m);
printf("%lld\n",2ll*n*m/__gcd(n,m));
}
}
详细
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3852kb
input:
5 3 2 1 2 1 1 2 3 2 1 1 3 4 2 1 2 3 1 2 3 1 0 3 4 4 1 1 2 5 4 1 2 3 0 2 3 1 1 3 4 2 0 4 5 2 1 1 1 1 1 5 2 1 2 2 1 1 3 3 0 1 5 2 1 3 4 1 1 1 2 10 5 1 2 10 1 2 3 3 1 3 4 4 0 4 5 4 1 5 6 2 1 2 7 8 0 2 8 9 1 4 9 1 0 1 10 4 0 10 10 2 1 8
output:
12 4 2 12 4
result:
wrong answer 1st numbers differ - expected: '3', found: '12'