結果

問題 No.564 背の順
ユーザー fagfagdfafagfagdfa
提出日時 2017-09-08 22:28:30
言語 Python2
(2.7.18)
結果
AC  
実行時間 11 ms / 2,000 ms
コード長 266 bytes
コンパイル時間 749 ms
コンパイル使用メモリ 6,472 KB
実行使用メモリ 6,148 KB
最終ジャッジ日時 2023-08-07 08:26:58
合計ジャッジ時間 1,319 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
5,984 KB
testcase_01 AC 11 ms
6,008 KB
testcase_02 AC 11 ms
6,004 KB
testcase_03 AC 11 ms
6,136 KB
testcase_04 AC 11 ms
5,980 KB
testcase_05 AC 11 ms
5,972 KB
testcase_06 AC 11 ms
6,148 KB
testcase_07 AC 10 ms
5,984 KB
testcase_08 AC 11 ms
6,064 KB
testcase_09 AC 10 ms
5,992 KB
testcase_10 AC 10 ms
6,148 KB
testcase_11 AC 10 ms
6,056 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

h, n = map(int, raw_input().split())

ct = 1

for i in range(n - 1):
    if h < input():
        ct += 1

if ct % 10 == 1:
    print str(ct) + "st"
elif ct % 10 == 2:
    print str(ct) + "nd"
elif ct % 10 == 3:
    print str(ct) + "rd"
else:
    print str(ct) + "th"
0