結果
問題 | No.1993 Horse Racing |
ユーザー |
![]() |
提出日時 | 2022-03-21 18:08:39 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 42 ms / 2,000 ms |
コード長 | 409 bytes |
コンパイル時間 | 182 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 52,480 KB |
最終ジャッジ日時 | 2024-10-09 05:41:21 |
合計ジャッジ時間 | 2,285 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 23 |
ソースコード
n = int(input())assert 2 <= n <= 100a = list(map(int, input().split()))assert n - 1 == len(a)x = 1000y = 1for i in a:assert 0 <= i <= 10x *= 1000 - iy *= 1000while x % 10 == 0 and y % 10 == 0:x //= 10y //= 10x = 1000 * y - xxx = str(x)m = len(str(x)) - len(str(y)) + 1le = xx[:m]ri = xx[m:]if len(ri) == 0:print(xx)else:print(xx[:m] + "." + xx[m:])