結果
問題 |
No.564 背の順
|
ユーザー |
![]() |
提出日時 | 2018-03-08 12:40:00 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 201 bytes |
コンパイル時間 | 31 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-10-05 07:45:16 |
合計ジャッジ時間 | 1,582 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 WA * 3 |
コンパイルメッセージ
Syntax OK
ソースコード
h, n = gets.split.map(&:to_i) a = [] (n-1).times do a << gets.to_i end ans = a.count { |i| i > h } + 1 case ans when 1 puts '1st' when 2 puts '2nd' when 3 puts '3rd' else puts "#{ans}th" end