/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 2ms 532.0 KiB

Code

/**
 * All Praise to Allah
 * ---------------------
 * Author     : Al Kayes Rifat
 * Portfolio  : alkayesrifat.netlify.app
 * Date       : 06/01/2026 (Tuesday)
 * Time       : 20:31 
 * ---------------------
 */

#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>// - Use 'less<T>' for set, 'less_equal<T>' for multiset
#define ll long long int
#define ull unsigned long long
#define endl "\n"

int main(){

    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int alkayesrifat ;
    cin >>  alkayesrifat ;
    while(alkayesrifat--)
    {
        int a , b;
        cin >>a >> b;

        int paici = -1;

        for(int i = 1 ; i <= 100 ; i++){
            if(i%a != 0 && i % b != 0){
                paici = i;
            }
        }
        cout << paici << 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:32:38
Judged At
2026-01-06 14:32:39
Judged By
Score
100
Total Time
2ms
Peak Memory
532.0 KiB