結果

問題 No.2036 Max Middle
ユーザー gr1msl3y
提出日時 2022-08-15 23:30:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 98 ms / 2,000 ms
コード長 166 bytes
コンパイル時間 188 ms
コンパイル使用メモリ 82,064 KB
実行使用メモリ 104,912 KB
最終ジャッジ日時 2024-10-02 11:55:07
合計ジャッジ時間 2,675 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

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