結果

問題 No.2036 Max Middle
ユーザー titiatitia
提出日時 2022-08-14 02:59:18
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 140 ms / 2,000 ms
コード長 201 bytes
コンパイル時間 129 ms
コンパイル使用メモリ 11,728 KB
実行使用メモリ 32,868 KB
最終ジャッジ日時 2023-10-25 10:35:41
合計ジャッジ時間 3,062 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
9,960 KB
testcase_01 AC 28 ms
9,960 KB
testcase_02 AC 29 ms
9,960 KB
testcase_03 AC 28 ms
9,960 KB
testcase_04 AC 29 ms
9,960 KB
testcase_05 AC 28 ms
9,960 KB
testcase_06 AC 28 ms
9,960 KB
testcase_07 AC 28 ms
9,960 KB
testcase_08 AC 87 ms
21,664 KB
testcase_09 AC 133 ms
29,848 KB
testcase_10 AC 137 ms
31,356 KB
testcase_11 AC 137 ms
31,824 KB
testcase_12 AC 137 ms
32,868 KB
testcase_13 AC 140 ms
32,192 KB
testcase_14 AC 30 ms
10,200 KB
testcase_15 AC 30 ms
10,164 KB
testcase_16 AC 139 ms
32,152 KB
testcase_17 AC 116 ms
17,616 KB
testcase_18 AC 127 ms
32,304 KB
testcase_19 AC 132 ms
32,572 KB
testcase_20 AC 135 ms
31,712 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N=int(input())
A=list(map(int,input().split()))

SUM=0
ANS=0

for i in range(N-1):
    if A[i]<A[i+1]:
        SUM+=1
    else:
        ANS+=SUM

print(ANS)
    
0