結果

問題 No.742 にゃんにゃんにゃん 猫の挨拶
ユーザー FloresFlores
提出日時 2019-08-24 21:40:47
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 243 bytes
コンパイル時間 561 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 18,848 KB
最終ジャッジ日時 2024-04-22 14:03:50
合計ジャッジ時間 5,220 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
17,824 KB
testcase_01 AC 29 ms
10,752 KB
testcase_02 AC 30 ms
10,752 KB
testcase_03 AC 30 ms
10,752 KB
testcase_04 AC 30 ms
10,624 KB
testcase_05 AC 34 ms
10,752 KB
testcase_06 AC 49 ms
10,624 KB
testcase_07 AC 95 ms
10,624 KB
testcase_08 AC 354 ms
10,624 KB
testcase_09 AC 30 ms
10,752 KB
testcase_10 AC 29 ms
10,624 KB
testcase_11 TLE -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
M=[int(input()) for _ in range(N)]
def bSort(a):
  ans=0
  for i in range(len(a)):
    for j in range(len(a)-1, i, -1):
      if a[j] < a[j-1]:
        ans+=1     
        a[j], a[j-1] = a[j-1], a[j]
  return ans
print(bSort(M))
0