結果

問題 No.2036 Max Middle
ユーザー 👑 rin204rin204
提出日時 2022-08-15 20:17:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 95 ms / 2,000 ms
コード長 165 bytes
コンパイル時間 132 ms
コンパイル使用メモリ 82,316 KB
実行使用メモリ 105,764 KB
最終ジャッジ日時 2024-04-10 06:57:47
合計ジャッジ時間 2,967 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
52,316 KB
testcase_01 AC 35 ms
53,008 KB
testcase_02 AC 32 ms
52,700 KB
testcase_03 AC 33 ms
52,424 KB
testcase_04 AC 35 ms
52,968 KB
testcase_05 AC 35 ms
51,948 KB
testcase_06 AC 33 ms
53,360 KB
testcase_07 AC 34 ms
52,704 KB
testcase_08 AC 63 ms
87,360 KB
testcase_09 AC 84 ms
105,112 KB
testcase_10 AC 89 ms
101,668 KB
testcase_11 AC 78 ms
105,764 KB
testcase_12 AC 77 ms
104,172 KB
testcase_13 AC 95 ms
102,368 KB
testcase_14 AC 39 ms
59,624 KB
testcase_15 AC 39 ms
59,952 KB
testcase_16 AC 88 ms
102,396 KB
testcase_17 AC 70 ms
98,948 KB
testcase_18 AC 74 ms
101,892 KB
testcase_19 AC 76 ms
103,392 KB
testcase_20 AC 78 ms
104,084 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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