Compile Error
foo.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
Code
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin >> t;
for (int i = 0; i < t; i++)
{
int a, b, lcd;
cin >> a >> b;
int mx = max(a, b);
lcd = -1;
for (int j = 2; j <= mx; j++)
{
if (a % j == 0 && b % j == 0)
{
lcd = j;
break;
}
}
cout << lcd << endl;
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1011 LCD
- Contest
- Brain booster - 1
- Language
- C99 (GCC 13.2.0)
- Submit At
- 2023-12-31 13:55:59
- Judged At
- 2024-11-11 03:46:31
- Judged By
- Score
- 0
- Total Time
- 0ms
- Peak Memory
- 0 Bytes