結果

問題 No.693 square1001 and Permutation 2
ユーザー naotoman
提出日時 2018-06-10 19:00:42
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 190 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-06-30 13:19:49
合計ジャッジ時間 999 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 6 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))
sum1 = 0
sum2 = 0
for i in range(n):
    sum1 += i+1
    sum2 += a[i]
if sum2 > sum1:
    print(sum2 - sum1)
else:
    print(sum1 - sum2)
0