結果

問題 No.356 円周上を回る3つの動点の一致
ユーザー odan3240odan3240
提出日時 2016-04-02 20:02:42
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 944 bytes
コンパイル時間 622 ms
コンパイル使用メモリ 73,904 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-10 10:39:40
合計ジャッジ時間 6,073 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 1 ms
6,940 KB
testcase_02 AC 1 ms
6,940 KB
testcase_03 AC 1 ms
6,944 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 1 ms
6,944 KB
testcase_10 AC 2 ms
6,940 KB
testcase_11 AC 2 ms
6,940 KB
testcase_12 WA -
testcase_13 AC 524 ms
6,944 KB
testcase_14 AC 272 ms
6,940 KB
testcase_15 AC 2 ms
6,944 KB
testcase_16 WA -
testcase_17 AC 34 ms
6,944 KB
testcase_18 AC 2 ms
6,940 KB
testcase_19 WA -
testcase_20 AC 2 ms
6,944 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 20 ms
6,940 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 8 ms
6,940 KB
testcase_32 AC 8 ms
6,940 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 AC 2 ms
6,944 KB
testcase_38 AC 8 ms
6,944 KB
testcase_39 WA -
testcase_40 AC 2 ms
6,944 KB
testcase_41 AC 11 ms
6,944 KB
testcase_42 AC 3 ms
6,944 KB
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 AC 2 ms
6,944 KB
testcase_48 AC 1 ms
6,944 KB
testcase_49 AC 3 ms
6,944 KB
testcase_50 AC 1 ms
6,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>

using namespace std;
using ll = long long;

#define all(c) (c).begin(), (c).end()
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define pb(e) push_back(e)
#define mp(a, b) make_pair(a, b)
#define fr first
#define sc second

bool equal(double d1,double d2) {
    return abs(d1-d2)<1e-8;
}

const ll INF=1e9;
const ll MOD=1e9+7;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

int t1,t2,t3;
int main() {
    cin>>t1>>t2>>t3;
    int lcm;
    lcm=t1/__gcd(t1,t2)*t2;
    lcm=lcm/__gcd(t3,lcm)*t3;
    int ans=1;
    rep(i,max({lcm/t1,lcm/t2,lcm/t3})+1) if(i) {
        if(lcm/t1%i==lcm/t2%i&&lcm/t2%i==lcm/t3%i) ans=max(ans,i);
    }

    int g=__gcd(lcm,ans);
    lcm/=g;
    ans/=g;
    cout<<lcm<<"/"<<ans<<endl;

    return 0;
}

0