結果

問題 No.2036 Max Middle
ユーザー gr1msl3ygr1msl3y
提出日時 2022-08-15 23:30:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 94 ms / 2,000 ms
コード長 166 bytes
コンパイル時間 431 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 105,676 KB
最終ジャッジ日時 2024-04-10 10:05:04
合計ジャッジ時間 3,116 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
53,168 KB
testcase_01 AC 35 ms
53,676 KB
testcase_02 AC 34 ms
52,424 KB
testcase_03 AC 35 ms
53,240 KB
testcase_04 AC 33 ms
53,348 KB
testcase_05 AC 34 ms
52,128 KB
testcase_06 AC 34 ms
52,200 KB
testcase_07 AC 33 ms
52,964 KB
testcase_08 AC 64 ms
87,340 KB
testcase_09 AC 84 ms
104,924 KB
testcase_10 AC 94 ms
101,864 KB
testcase_11 AC 79 ms
105,676 KB
testcase_12 AC 78 ms
102,660 KB
testcase_13 AC 93 ms
102,348 KB
testcase_14 AC 40 ms
60,268 KB
testcase_15 AC 39 ms
59,596 KB
testcase_16 AC 91 ms
102,004 KB
testcase_17 AC 73 ms
96,928 KB
testcase_18 AC 74 ms
103,424 KB
testcase_19 AC 78 ms
102,988 KB
testcase_20 AC 81 ms
104,092 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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