結果

問題 No.564 背の順
ユーザー titia
提出日時 2024-04-17 16:56:41
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 35 ms / 2,000 ms
コード長 346 bytes
コンパイル時間 191 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-10-09 11:04:20
合計ジャッジ時間 1,236 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

H,N=map(int,input().split())
ANS=1
for i in range(N-1):
    h=int(input())
    if h>H:
        ANS+=1

if ANS%10==1:
    print(ANS,end="")
    print("st")
elif ANS%10==2:
    print(ANS,end="")
    print("nd")
elif ANS%10==3:
    print(ANS,end="")
    print("rd")
else:
    print(ANS,end="")
    print("th")
0