結果

問題 No.1687 What the Heck?
ユーザー Keroru
提出日時 2021-09-26 20:26:15
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 143 bytes
コンパイル時間 187 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 107,136 KB
最終ジャッジ日時 2024-07-05 16:57:51
合計ジャッジ時間 2,125 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 7 WA * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

n,*p=map(int,open(0).read().split())
a=0
for i in range(n):
    if p[i]==n:
        a-=i+1
    else:
        a+=i+1
if n==1:
    a=0
print(a)
0