結果

問題 No.1687 What the Heck?
ユーザー nephrologistnephrologist
提出日時 2021-09-25 11:37:29
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 161 bytes
コンパイル時間 420 ms
コンパイル使用メモリ 87,220 KB
実行使用メモリ 107,172 KB
最終ジャッジ日時 2023-09-18 22:58:58
合計ジャッジ時間 3,714 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,084 KB
testcase_01 AC 67 ms
71,268 KB
testcase_02 AC 69 ms
71,388 KB
testcase_03 AC 68 ms
71,172 KB
testcase_04 AC 69 ms
71,204 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 85 ms
85,216 KB
testcase_10 AC 82 ms
81,740 KB
testcase_11 AC 83 ms
81,872 KB
testcase_12 AC 110 ms
106,964 KB
testcase_13 AC 111 ms
106,968 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
P=list(map(int,input().split()))
goukei = (1+n)*n//2
for idx, p in enumerate(P):
    if p==n:
        goukei-=2*(idx+1)
print(max(0, goukei))
    
0