/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 368.0 KiB
#2 Accepted 3ms 460.0 KiB

Code

#include <bits/stdc++.h>
using namespace std;

int main() {
    int t;
    cin >> t;
    while (t--) {
        int x, y;
        cin >> x >> y;
        cout << (x == 1 || y == 1 ? -1 : 1) << "\n";
    }
}

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:31:40
Judged At
2026-01-06 14:31:40
Judged By
Score
100
Total Time
3ms
Peak Memory
460.0 KiB