結果
問題 | No.356 円周上を回る3つの動点の一致 |
ユーザー |
![]() |
提出日時 | 2020-03-02 23:35:08 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 33 ms / 5,000 ms |
コード長 | 973 bytes |
コンパイル時間 | 118 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-10-13 21:22:58 |
合計ジャッジ時間 | 2,963 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 48 |
ソースコード
import sys sys.setrecursionlimit(10 ** 6) from bisect import * from collections import * from heapq import * def II(): return int(sys.stdin.readline()) def MI(): return map(int, sys.stdin.readline().split()) def LI(): return list(map(int, sys.stdin.readline().split())) def SI(): return sys.stdin.readline()[:-1] def LLI(rows_number): return [LI() for _ in range(rows_number)] int1 = lambda x: int(x) - 1 def MI1(): return map(int1, sys.stdin.readline().split()) def LI1(): return list(map(int1, sys.stdin.readline().split())) p2D = lambda x: print(*x, sep="\n") dij = [(1, 0), (0, 1), (-1, 0), (0, -1)] def gcd(a,b): while b:a,b=b,a%b return a def lcm(a,b): return a*b//gcd(a,b) def main(): t1=II() t2=II() t3=II() a1,b1=t2*t1,t2-t1 a2,b2=t3*t1,t3-t1 g=gcd(a1,b1) a1,b1=a1//g,b1//g g=gcd(a2,b2) a2,b2=a2//g,b2//g den=gcd(b1,b2) num=lcm(a1,a2) g=gcd(den,num) print("{}/{}".format(num//g,den//g)) main()