結果

問題 No.1624 三角形の反射
ユーザー dango
提出日時 2023-07-15 19:22:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 2,000 ms
コード長 231 bytes
コンパイル時間 145 ms
コンパイル使用メモリ 82,328 KB
実行使用メモリ 53,884 KB
最終ジャッジ日時 2024-09-17 04:07:20
合計ジャッジ時間 2,032 ms
ジャッジサーバーID
(参考情報)
judge1 / judge6
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
y = int(input().replace('.', ''))
x = 1000
g = math.gcd(y, x)
y //= g
x //= g
char = 'A' if (x + y) % 2 == 0 else ('B' if x % 2 == 1 else 'C')
cnt = x + y - 2
cnt += abs(x - y) // 2
cnt += (x + y) // 2
print(char, cnt)
0