結果

問題 No.356 円周上を回る3つの動点の一致
ユーザー tracy201003tracy201003
提出日時 2024-09-22 19:53:35
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 274 bytes
コンパイル時間 1,507 ms
コンパイル使用メモリ 165,848 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-22 19:53:43
合計ジャッジ時間 2,900 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 48
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll gcd(ll p,ll q){
	return q?gcd(q,p%q):p;
}
int main(){
	ll t1,t2,t3;
	ll temp,m;
	cin>>t1>>t2>>t3;
	m=gcd((t3-t1)*t2,(t3-t2)*t1);
	temp=gcd(t1*t2*t3,m);
	printf("%ld/%ld",t1*t2*t3/temp,m/temp);
	return 0;
}
0