結果
問題 | No.1816 MUL-DIV Game |
ユーザー | brthyyjp |
提出日時 | 2022-01-21 22:14:06 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 304 bytes |
コンパイル時間 | 1,069 ms |
コンパイル使用メモリ | 87,252 KB |
実行使用メモリ | 93,732 KB |
最終ジャッジ日時 | 2023-08-17 06:21:12 |
合計ジャッジ時間 | 5,348 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 92 ms
71,576 KB |
testcase_01 | AC | 92 ms
71,156 KB |
testcase_02 | AC | 91 ms
71,228 KB |
testcase_03 | AC | 92 ms
71,580 KB |
testcase_04 | AC | 95 ms
71,432 KB |
testcase_05 | AC | 94 ms
71,632 KB |
testcase_06 | AC | 91 ms
71,484 KB |
testcase_07 | AC | 93 ms
71,252 KB |
testcase_08 | AC | 91 ms
71,296 KB |
testcase_09 | AC | 107 ms
77,800 KB |
testcase_10 | AC | 117 ms
81,748 KB |
testcase_11 | AC | 118 ms
81,844 KB |
testcase_12 | AC | 115 ms
80,540 KB |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | AC | 145 ms
93,288 KB |
testcase_27 | WA | - |
testcase_28 | AC | 144 ms
93,468 KB |
testcase_29 | WA | - |
ソースコード
n = int(input()) A = list(map(int, input().split())) A.sort() from collections import deque A = deque(A) for i in range(n-1): if i%2 == 0: x = A.popleft() y = A.pop() A.append(x*y) else: y = A.pop() x = A.pop() A.appendleft((x+y-1)//y) print(A[0])