結果

問題 No.2036 Max Middle
ユーザー ntudantuda
提出日時 2022-08-16 16:41:09
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 104 ms / 2,000 ms
コード長 171 bytes
コンパイル時間 359 ms
コンパイル使用メモリ 82,200 KB
実行使用メモリ 104,944 KB
最終ジャッジ日時 2024-04-14 10:29:21
合計ジャッジ時間 3,324 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,208 KB
testcase_01 AC 38 ms
52,776 KB
testcase_02 AC 38 ms
52,264 KB
testcase_03 AC 42 ms
52,620 KB
testcase_04 AC 39 ms
52,944 KB
testcase_05 AC 39 ms
52,620 KB
testcase_06 AC 38 ms
52,572 KB
testcase_07 AC 37 ms
52,908 KB
testcase_08 AC 70 ms
86,956 KB
testcase_09 AC 94 ms
104,944 KB
testcase_10 AC 103 ms
101,760 KB
testcase_11 AC 89 ms
104,364 KB
testcase_12 AC 86 ms
103,308 KB
testcase_13 AC 104 ms
102,512 KB
testcase_14 AC 44 ms
60,420 KB
testcase_15 AC 44 ms
61,084 KB
testcase_16 AC 101 ms
102,196 KB
testcase_17 AC 80 ms
97,696 KB
testcase_18 AC 83 ms
101,656 KB
testcase_19 AC 85 ms
102,612 KB
testcase_20 AC 88 ms
104,828 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))
ans = 0
cnt = 0
for i in range(1, N):
    if A[i-1] < A[i]:
        cnt += 1
    else:
        ans += cnt
print(ans)

0