結果

問題 No.1687 What the Heck?
ユーザー Mik10Mik10
提出日時 2021-10-06 14:18:39
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 301 bytes
コンパイル時間 476 ms
コンパイル使用メモリ 86,976 KB
実行使用メモリ 106,812 KB
最終ジャッジ日時 2023-09-30 08:46:58
合計ジャッジ時間 3,473 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,264 KB
testcase_01 WA -
testcase_02 AC 78 ms
71,212 KB
testcase_03 WA -
testcase_04 AC 76 ms
71,232 KB
testcase_05 AC 75 ms
71,368 KB
testcase_06 AC 76 ms
71,368 KB
testcase_07 AC 92 ms
84,484 KB
testcase_08 AC 95 ms
89,236 KB
testcase_09 AC 92 ms
84,572 KB
testcase_10 AC 86 ms
81,168 KB
testcase_11 AC 86 ms
81,180 KB
testcase_12 AC 117 ms
106,420 KB
testcase_13 AC 117 ms
106,476 KB
testcase_14 AC 116 ms
106,512 KB
testcase_15 AC 117 ms
106,328 KB
testcase_16 AC 118 ms
106,228 KB
testcase_17 AC 78 ms
75,632 KB
testcase_18 WA -
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
suzu = list(map(int, input().split()))
draw = 0
pt = sum(range(n)) + n
for i in range(n, 1, -1):
    smax = suzu.index(i) + 1
    smax2 = suzu.index(i-1) + 1
    if smax2 <= smax/2:
        draw += smax
        continue
    else:
        pt -= (smax*2 + draw)
        break
print (pt)
0