QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#306754#7502. Painting the RoadsvavkaWA 0ms3852kbC++23192b2024-01-17 08:32:102024-01-17 08:32:10

Judging History

你现在查看的是最新测评结果

  • [2024-01-17 08:32:10]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3852kb
  • [2024-01-17 08:32:10]
  • 提交

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));
	}
}

Details

Tip: Click on the bar to expand more detailed information

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'