結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,140 KB
testcase_01 AC 74 ms
71,368 KB
testcase_02 AC 73 ms
71,344 KB
testcase_03 AC 75 ms
71,180 KB
testcase_04 AC 74 ms
71,108 KB
testcase_05 AC 74 ms
71,284 KB
testcase_06 AC 74 ms
71,420 KB
testcase_07 AC 91 ms
84,768 KB
testcase_08 AC 98 ms
89,576 KB
testcase_09 AC 90 ms
84,572 KB
testcase_10 AC 86 ms
81,188 KB
testcase_11 AC 85 ms
81,304 KB
testcase_12 AC 118 ms
106,600 KB
testcase_13 AC 120 ms
106,308 KB
testcase_14 AC 120 ms
106,476 KB
testcase_15 AC 120 ms
106,128 KB
testcase_16 AC 116 ms
106,468 KB
testcase_17 AC 79 ms
75,756 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
else:
    pt = 0
print (pt)
0