結果
| 問題 |
No.356 円周上を回る3つの動点の一致
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-04-02 00:19:53 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,153 bytes |
| コンパイル時間 | 1,383 ms |
| コンパイル使用メモリ | 159,932 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-02 09:11:17 |
| 合計ジャッジ時間 | 2,660 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 WA * 30 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using i32 = int;
using i64 = int64_t;
template <class T> using vec = vector<T>;
using wdgraph = vec<vec<pair<i32, i32>>>;
#define times(n, i) for (i32 i = 0; i < (n); i++)
#define range(n, m, i) for (i32 i = (n); i < (m); i++)
#define upto(n, m, i) for (i32 i = (n); i <= (m); i++)
#define downto(n, m, i) for (i32 i = (n); i >= (m); i--)
#define foreach(xs, x) for (auto &x : (xs))
#define all(xs) (xs).begin(), (xs).end()
#define sortall(xs) sort(all(xs))
#define reverseall(xs) reverse(all(xs))
#define uniqueall(xs) erase(unique(all(xs)), (xs).end())
#define maximum(xs) *max_element(all(xs))
#define minimum(xs) *min_element(all(xs))
i64 MOD = 1000000007;
int64_t gcd(int64_t x, int64_t y) {
while (y > 0) { int64_t r = x % y; x = y; y = r; }
return x;
}
i64 lcm(i64 x, i64 y)
{
return x*y/gcd(x, y);
}
i32 main()
{
i32 a,b,c;
cin >> a >> b >> c;
i32 d = lcm(lcm(a, b), c);
i32 x = (d/a), y = (d/b), z = (d/c);
i32 u = z;
while(u > 0) {
if (x%u == y%u && y%u == z%u)
break;
u--;
}
cout << d << "/" << u << endl;
return 0;
}