結果
問題 | No.1816 MUL-DIV Game |
ユーザー | brthyyjp |
提出日時 | 2022-01-21 21:23:49 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 304 bytes |
コンパイル時間 | 2,097 ms |
コンパイル使用メモリ | 86,208 KB |
実行使用メモリ | 93,208 KB |
最終ジャッジ日時 | 2023-08-17 04:51:12 |
合計ジャッジ時間 | 5,872 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 93 ms
71,264 KB |
testcase_01 | AC | 96 ms
71,440 KB |
testcase_02 | AC | 96 ms
71,252 KB |
testcase_03 | AC | 100 ms
71,288 KB |
testcase_04 | AC | 98 ms
71,340 KB |
testcase_05 | AC | 93 ms
71,080 KB |
testcase_06 | AC | 94 ms
71,448 KB |
testcase_07 | AC | 95 ms
71,140 KB |
testcase_08 | AC | 94 ms
71,264 KB |
testcase_09 | AC | 105 ms
77,348 KB |
testcase_10 | AC | 125 ms
81,232 KB |
testcase_11 | AC | 122 ms
81,652 KB |
testcase_12 | AC | 117 ms
80,380 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 | 146 ms
93,208 KB |
testcase_27 | WA | - |
testcase_28 | AC | 146 ms
93,004 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.pop() y = A.pop() A.append(x*y) else: x = A.popleft() y = A.pop() A.appendleft((x+y-1)//y) print(A[0])