結果

問題 No.1604 Swap Sort:ONE
ユーザー ntudantuda
提出日時 2021-08-12 19:15:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 84 ms / 2,000 ms
コード長 165 bytes
コンパイル時間 182 ms
コンパイル使用メモリ 82,200 KB
実行使用メモリ 62,416 KB
最終ジャッジ日時 2024-04-09 23:08:49
合計ジャッジ時間 3,004 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,284 KB
testcase_01 AC 38 ms
52,336 KB
testcase_02 AC 37 ms
53,244 KB
testcase_03 AC 35 ms
51,752 KB
testcase_04 AC 37 ms
52,156 KB
testcase_05 AC 57 ms
62,084 KB
testcase_06 AC 53 ms
60,244 KB
testcase_07 AC 82 ms
62,416 KB
testcase_08 AC 83 ms
61,140 KB
testcase_09 AC 78 ms
61,292 KB
testcase_10 AC 82 ms
62,004 KB
testcase_11 AC 84 ms
62,012 KB
testcase_12 AC 77 ms
61,740 KB
testcase_13 AC 77 ms
61,064 KB
testcase_14 AC 77 ms
62,320 KB
testcase_15 AC 83 ms
61,348 KB
testcase_16 AC 82 ms
62,248 KB
testcase_17 AC 55 ms
61,132 KB
testcase_18 AC 57 ms
62,068 KB
testcase_19 AC 75 ms
61,540 KB
testcase_20 AC 55 ms
61,068 KB
testcase_21 AC 78 ms
61,360 KB
testcase_22 AC 69 ms
61,808 KB
testcase_23 AC 45 ms
59,856 KB
testcase_24 AC 42 ms
60,760 KB
testcase_25 AC 72 ms
62,192 KB
testcase_26 AC 58 ms
61,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
P = list(map(int,input().split()))
count = 0
for i in range(1,N):
    for j in range(i):
        if P[j] > P[i]:
            count += 1
print(count)
0