結果
| 問題 | No.356 円周上を回る3つの動点の一致 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-04-03 02:22:56 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0) |
| 結果 |
AC
|
| 実行時間 | 96 ms / 5,000 ms |
| + 833µs | |
| コード長 | 334 bytes |
| 記録 | |
| コンパイル時間 | 292 ms |
| コンパイル使用メモリ | 21,416 KB |
| 実行使用メモリ | 15,868 KB |
| 最終ジャッジ日時 | 2026-08-24 08:42:09 |
| 合計ジャッジ時間 | 7,570 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 48 |
ソースコード
from math import gcd
t1 = int(input())
t2 = int(input())
t3 = int(input())
LCM12 = t1 * t2 // gcd(t1, t2)
LCM123 = LCM12 * t3 // gcd(LCM12, t3)
n1 = LCM123//t1
n2 = LCM123//t2
n3 = LCM123//t3
d = 1
for i in range(2, t3 + 1):
if n1 % i == n2 % i == n3 % i:
d = i
p = gcd(LCM123, d)
print('{}/{}'.format(LCM123//p, d//p))