結果

問題 No.2036 Max Middle
ユーザー aaaaaaaaaa2230
提出日時 2022-08-17 22:42:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 93 ms / 2,000 ms
コード長 165 bytes
コンパイル時間 123 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 106,368 KB
最終ジャッジ日時 2024-10-05 04:39:53
合計ジャッジ時間 2,790 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
A = list(map(int,input().split()))
ans = 0
num = 0
for a,na in zip(A,A[1:]):
    if a < na:
        num += 1
    else:
        ans += num
print(ans)
0