結果

問題 No.564 背の順
ユーザー miya145592miya145592
提出日時 2023-05-03 02:30:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 74 ms / 2,000 ms
コード長 249 bytes
コンパイル時間 1,095 ms
コンパイル使用メモリ 87,096 KB
実行使用メモリ 71,444 KB
最終ジャッジ日時 2023-08-13 16:27:11
合計ジャッジ時間 1,934 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
70,936 KB
testcase_01 AC 72 ms
70,932 KB
testcase_02 AC 74 ms
71,352 KB
testcase_03 AC 71 ms
71,444 KB
testcase_04 AC 73 ms
71,120 KB
testcase_05 AC 74 ms
71,080 KB
testcase_06 AC 73 ms
71,132 KB
testcase_07 AC 73 ms
71,092 KB
testcase_08 AC 71 ms
71,260 KB
testcase_09 AC 73 ms
71,340 KB
testcase_10 AC 72 ms
71,276 KB
testcase_11 AC 72 ms
71,360 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

H, N = map(int, input().split())
ans = 1
for _ in range(N-1):
    h = int(input())
    if H<h:
        ans+=1
if ans%10==1:
    print(f"{ans}st")
elif ans%10==2:
    print(f"{ans}nd")
elif ans%10==3:
    print(f"{ans}rd")
else:
    print(f"{ans}th")
0