結果
| 問題 | No.564 背の順 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-10-16 11:26:35 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 94 ms / 2,000 ms |
| + 308µs | |
| コード長 | 500 bytes |
| 記録 | |
| コンパイル時間 | 496 ms |
| コンパイル使用メモリ | 21,540 KB |
| 実行使用メモリ | 15,868 KB |
| 最終ジャッジ日時 | 2026-07-25 17:00:12 |
| 合計ジャッジ時間 | 2,742 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 |
ソースコード
class Problem0564:
def solve(this):
h,n = map(int, input().split())
res = [int(input()) for i in range(n - 1)]
res.append(h)
res.sort()
r = n - res.index(h)
if r % 10 == 1:
print(str(r) + 'st')
elif r % 10 == 2:
print(str(r) + 'nd')
elif r % 10 == 3:
print(str(r) + 'rd')
else:
print(str(r) + 'th')
if __name__ == "__main__":
problem = Problem0564()
problem.solve()