結果
問題 |
No.1624 三角形の反射
|
ユーザー |
![]() |
提出日時 | 2021-07-23 21:40:42 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 750 bytes |
コンパイル時間 | 1,465 ms |
コンパイル使用メモリ | 82,036 KB |
実行使用メモリ | 54,412 KB |
最終ジャッジ日時 | 2024-07-18 17:18:58 |
合計ジャッジ時間 | 2,149 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 1 WA * 21 |
ソースコード
import sys from math import gcd sys.setrecursionlimit(10**7) def I(): return int(sys.stdin.readline().rstrip()) def MI(): return map(int,sys.stdin.readline().rstrip().split()) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LI2(): return list(map(int,sys.stdin.readline().rstrip())) def S(): return sys.stdin.readline().rstrip() def LS(): return list(sys.stdin.readline().rstrip().split()) def LS2(): return list(sys.stdin.readline().rstrip()) a = float(input()) a *= 1000 a += .5 a = int(a) b = 1000 g = gcd(a,b) a //= g b //= g if (a+b) % 2 == 0: ans0 = 'A' ans1 = a+2*b-2 else: if a % 2 == 0: ans0 = 'B' ans1 = a+2*b-3 else: ans0 = 'C' ans1 = a+2*b-3 print(ans0,ans1)