Wrong Answer
Code
using namespace std;
#include <bits/stdc++.h>
int main()
{
int n;
cin >> n;
vector<pair<int, int>>input(n);
for (int i = 0; i < n; i++){
int first, second;
cin >> first; cin >> second;
input[i] = pair<int, int>{first, second};
}
for (auto& p: input){
for (int i = 1; i <= 100; i++){
bool can = false;
if (i % p.first != 0 && i % p.second != 0){
cout << i << endl;
can = true;
}
if (!can) cout << -1 << endl;
}
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1235 A. Valid Integer
- Contest
- Happy New Year 2026
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2026-01-06 14:44:45
- Judged At
- 2026-01-06 14:44:45
- Judged By
- Score
- 0
- Total Time
- 170ms
- Peak Memory
- 804.0 KiB