結果

問題 No.2036 Max Middle
ユーザー keisuke6keisuke6
提出日時 2022-08-12 23:39:43
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 142 ms / 2,000 ms
コード長 121 bytes
コンパイル時間 566 ms
コンパイル使用メモリ 11,716 KB
実行使用メモリ 32,808 KB
最終ジャッジ日時 2023-10-24 11:58:34
合計ジャッジ時間 3,448 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,020 KB
testcase_01 AC 29 ms
10,020 KB
testcase_02 AC 28 ms
10,020 KB
testcase_03 AC 27 ms
10,020 KB
testcase_04 AC 28 ms
10,020 KB
testcase_05 AC 28 ms
10,020 KB
testcase_06 AC 27 ms
10,020 KB
testcase_07 AC 28 ms
10,020 KB
testcase_08 AC 88 ms
21,468 KB
testcase_09 AC 131 ms
30,052 KB
testcase_10 AC 140 ms
31,472 KB
testcase_11 AC 138 ms
31,768 KB
testcase_12 AC 135 ms
32,808 KB
testcase_13 AC 142 ms
32,288 KB
testcase_14 AC 29 ms
10,260 KB
testcase_15 AC 29 ms
10,232 KB
testcase_16 AC 136 ms
32,020 KB
testcase_17 AC 117 ms
17,520 KB
testcase_18 AC 131 ms
31,660 KB
testcase_19 AC 130 ms
31,096 KB
testcase_20 AC 134 ms
31,120 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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