結果

問題 No.1687 What the Heck?
ユーザー lloyzlloyz
提出日時 2021-11-22 22:09:27
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
WA  
実行時間 -
コード長 207 bytes
コンパイル時間 260 ms
コンパイル使用メモリ 10,628 KB
実行使用メモリ 30,608 KB
最終ジャッジ日時 2023-09-06 17:00:10
合計ジャッジ時間 3,189 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,752 KB
testcase_01 AC 14 ms
7,880 KB
testcase_02 AC 14 ms
7,756 KB
testcase_03 WA -
testcase_04 AC 14 ms
7,824 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 39 ms
15,692 KB
testcase_10 AC 31 ms
13,276 KB
testcase_11 AC 34 ms
13,868 KB
testcase_12 AC 92 ms
29,776 KB
testcase_13 AC 79 ms
29,804 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()))

if n == 1:
    print(0)
else:
    for i in range(n):
        if P[i] == n:
            print(n * (n + 1) // 2 - 2 * (i + 1))
            break
0