結果
| 問題 |
No.564 背の順
|
| コンテスト | |
| ユーザー |
kawacchu
|
| 提出日時 | 2019-03-15 20:41:44 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 701 bytes |
| コンパイル時間 | 88 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-07-01 20:05:58 |
| 合計ジャッジ時間 | 1,257 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 6 WA * 3 |
ソースコード
H,N = map(int,input().split())
L = [int(input()) for i in range(N-1)]
L = sorted(L,reverse=True)
if H < min(L) :
if len(L) % 10 == 0 :
ans = "{}th".format(N)
elif len(L) % 10 == 1 :
ans = "{}nd".format(N)
elif len(L) % 10 == 2 :
ans = "{}rd".format(N)
else :
ans = "{}th".format(N)
else :
for i in range(len(L)) :
if H > L[i] :
if i % 10 == 0 :
ans = "{}th".format(1+i)
elif i % 10 == 1 :
ans = "{}nd".format(1+i)
elif i % 10 == 2 :
ans = "{}rd".format(1+i)
else :
ans = "{}th".format(1+i)
break
print(ans)
kawacchu