Code
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
for (int i = 0; i < n; i++){
int x, y;
cin >> x; cin >> y;
cout << ((x == 1 || y == 1) ? -1: 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:54:48
- Judged At
- 2026-01-06 14:54:49
- Judged By
- Score
- 100
- Total Time
- 3ms
- Peak Memory
- 532.0 KiB