結果

問題 No.1687 What the Heck?
ユーザー TomoyarnTomoyarn
提出日時 2022-01-01 20:44:19
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 182 bytes
コンパイル時間 483 ms
コンパイル使用メモリ 82,348 KB
実行使用メモリ 102,512 KB
最終ジャッジ日時 2024-04-18 19:59:58
合計ジャッジ時間 3,009 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
52,136 KB
testcase_01 AC 36 ms
52,492 KB
testcase_02 AC 37 ms
52,384 KB
testcase_03 AC 36 ms
51,676 KB
testcase_04 AC 37 ms
52,888 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 50 ms
73,956 KB
testcase_10 AC 45 ms
67,960 KB
testcase_11 AC 46 ms
69,128 KB
testcase_12 AC 77 ms
102,028 KB
testcase_13 AC 76 ms
101,636 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

#初項 a,公差 1,末項 l
l = N
a = 1

wa =  (l - a + 1) * (a + l) // 2

A = list(map(int, input().split()))
idx = A.index(N) + 1

print(max(wa - idx * 2, 0))
0