Submission #59487458


Source Code Expand

#include<bits/stdc++.h>
#include"atcoder/all"
using namespace std;
using namespace atcoder;
#define rep(i,n) for(int i=0;i<n;i++)
#define all(a) a.begin(),a.end()
typedef long long ll;
typedef vector<ll> vi;
typedef pair<int,int> P;
constexpr ll mod = 998244353;
typedef modint998244353 mi;

ll gcd(ll a,ll b){
    if(!b)return a;return gcd(b,a%b);
}

int main(){
    ll a,b;cin>>a>>b;
    ll g=gcd(a,b);
    ll e18=1e18;
    a/=g;
    if(a>e18/b){
        cout<<"Large"<<endl;
    }
    else{
        ll l=a*b;
        if(l>e18)cout<<"Large"<<endl;
        else cout<<l<<endl;
    }
}

Submission Info

Submission Time
Task 038 - Large LCM(★3)
User Rho17
Language C++ 20 (gcc 12.2)
Score 3
Code Size 614 Byte
Status AC
Exec Time 8 ms
Memory 3680 KiB

Compile Error

Main.cpp: In function ‘ll gcd(ll, ll)’:
Main.cpp:14:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
   14 |     if(!b)return a;return gcd(b,a%b);
      |     ^~
Main.cpp:14:20: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
   14 |     if(!b)return a;return gcd(b,a%b);
      |                    ^~~~~~

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 3 / 3
Status
AC × 3
AC × 45
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, hand_06.txt, hand_07.txt, hand_08.txt, hand_09.txt, hand_10.txt, hand_11.txt, hand_12.txt, hand_13.txt, hand_14.txt, hand_15.txt, hand_16.txt, hand_17.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt, random_20.txt, random_21.txt, random_22.txt, random_23.txt, random_24.txt, random_25.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
hand_01.txt AC 8 ms 3420 KiB
hand_02.txt AC 1 ms 3648 KiB
hand_03.txt AC 1 ms 3500 KiB
hand_04.txt AC 1 ms 3500 KiB
hand_05.txt AC 1 ms 3644 KiB
hand_06.txt AC 1 ms 3492 KiB
hand_07.txt AC 1 ms 3576 KiB
hand_08.txt AC 1 ms 3460 KiB
hand_09.txt AC 1 ms 3556 KiB
hand_10.txt AC 1 ms 3504 KiB
hand_11.txt AC 1 ms 3484 KiB
hand_12.txt AC 1 ms 3564 KiB
hand_13.txt AC 1 ms 3648 KiB
hand_14.txt AC 1 ms 3552 KiB
hand_15.txt AC 1 ms 3564 KiB
hand_16.txt AC 1 ms 3564 KiB
hand_17.txt AC 1 ms 3508 KiB
random_01.txt AC 1 ms 3504 KiB
random_02.txt AC 1 ms 3532 KiB
random_03.txt AC 1 ms 3508 KiB
random_04.txt AC 1 ms 3452 KiB
random_05.txt AC 1 ms 3540 KiB
random_06.txt AC 1 ms 3540 KiB
random_07.txt AC 1 ms 3536 KiB
random_08.txt AC 1 ms 3608 KiB
random_09.txt AC 1 ms 3508 KiB
random_10.txt AC 1 ms 3520 KiB
random_11.txt AC 1 ms 3580 KiB
random_12.txt AC 1 ms 3508 KiB
random_13.txt AC 1 ms 3504 KiB
random_14.txt AC 1 ms 3660 KiB
random_15.txt AC 1 ms 3548 KiB
random_16.txt AC 1 ms 3516 KiB
random_17.txt AC 1 ms 3576 KiB
random_18.txt AC 1 ms 3660 KiB
random_19.txt AC 1 ms 3500 KiB
random_20.txt AC 1 ms 3524 KiB
random_21.txt AC 1 ms 3680 KiB
random_22.txt AC 1 ms 3496 KiB
random_23.txt AC 1 ms 3508 KiB
random_24.txt AC 1 ms 3572 KiB
random_25.txt AC 1 ms 3500 KiB
sample_01.txt AC 1 ms 3552 KiB
sample_02.txt AC 1 ms 3504 KiB
sample_03.txt AC 1 ms 3540 KiB