/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 540.0 KiB
#2 Wrong Answer 1ms 556.0 KiB
#3 Wrong Answer 1ms 540.0 KiB

Code

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

typedef long long ll;
#define bug(a) cout << #a << " : " << a << endl;

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int t = 1; cin >> t;
    while (t--) {
        ll a,b,c,d,x;cin>>a>>b>>c>>x;
        ll k=lcm(a,b);
        k=lcm(k,c);
        if(k<x){
            cout<<k<<endl;
        }
        else cout<<-1<<endl;
    }
    return 0;
}

Information

Submit By
Type
Submission
Problem
P1025 GCM
Language
C++17 (G++ 13.2.0)
Submit At
2024-12-07 19:58:13
Judged At
2024-12-07 19:58:13
Judged By
Score
2
Total Time
1ms
Peak Memory
556.0 KiB