結果
問題 | No.356 円周上を回る3つの動点の一致 |
ユーザー |
![]() |
提出日時 | 2018-11-09 07:07:05 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 569 bytes |
コンパイル時間 | 652 ms |
コンパイル使用メモリ | 91,800 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-13 21:12:54 |
合計ジャッジ時間 | 1,793 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 48 |
ソースコード
#include <cstdio> #include <cstring> #include <iostream> #include <string> #include <cmath> #include <bitset> #include <vector> #include <map> #include <set> #include <queue> #include <deque> #include <algorithm> #include <complex> #include <unordered_map> #include <random> using namespace std; typedef long long int ll; typedef pair<int, int> P; ll gcd(ll a, ll b){ if(b==0) return a; return gcd(b, a%b); } int main() { ll t1, t2, t3; cin>>t1>>t2>>t3; ll g=gcd(t1*(t3-t2), t3*(t2-t1)); ll d=gcd(t1*t2*t3, g); printf("%lld/%lld\n", t1*t2*t3/d, g/d); return 0; }