結果

問題 No.564 背の順
ユーザー Liny52551272Liny52551272
提出日時 2019-11-13 14:25:49
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 32 ms / 2,000 ms
コード長 347 bytes
コンパイル時間 80 ms
コンパイル使用メモリ 11,896 KB
実行使用メモリ 10,032 KB
最終ジャッジ日時 2023-10-21 19:41:56
合計ジャッジ時間 1,101 ms
ジャッジサーバーID
(参考情報)
judge9 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
10,032 KB
testcase_01 AC 30 ms
10,032 KB
testcase_02 AC 29 ms
10,032 KB
testcase_03 AC 29 ms
10,032 KB
testcase_04 AC 29 ms
10,032 KB
testcase_05 AC 29 ms
10,032 KB
testcase_06 AC 30 ms
10,032 KB
testcase_07 AC 30 ms
10,032 KB
testcase_08 AC 30 ms
10,032 KB
testcase_09 AC 29 ms
10,032 KB
testcase_10 AC 30 ms
10,032 KB
testcase_11 AC 29 ms
10,032 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

H, N = input().strip().split(' ')
H, N = int(H), int(N)

high = 1

for i in range(N - 1):
  tmp = int(input().strip())
  if tmp > H:
    high += 1

if high % 10 == 1:
  tmp = str(high) + 'st'
elif high % 10 == 2:
  tmp = str(high) + 'nd'
elif high % 10 == 3:
  tmp = str(high) + 'rd'
else:
  tmp = str(high) + 'th'

print(tmp)
0