結果
問題 |
No.564 背の順
|
ユーザー |
![]() |
提出日時 | 2018-04-19 23:54:54 |
言語 | Lua (LuaJit 2.1.1734355927) |
結果 |
WA
|
実行時間 | - |
コード長 | 237 bytes |
コンパイル時間 | 95 ms |
コンパイル使用メモリ | 5,248 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-27 04:56:30 |
合計ジャッジ時間 | 774 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 WA * 3 |
ソースコード
print((function (h, n) local r = 1 for _=1,n-1 do if h < io.stdin:read("*n") then r = r+1 end end return string.format("%d%s", r, r==1 and "st" or r==2 and "nd" or r==3 and "rd" or "th") end)(io.stdin:read("*n"), io.stdin:read("*n")))