結果
問題 |
No.564 背の順
|
ユーザー |
![]() |
提出日時 | 2024-02-26 23:49:43 |
言語 | Nim (2.2.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 300 bytes |
コンパイル時間 | 3,416 ms |
コンパイル使用メモリ | 65,652 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-09-29 11:49:26 |
合計ジャッジ時間 | 4,148 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 |
ソースコード
import sequtils, strutils let xs = stdin.readLine.split.map parseInt h = xs[0] n = xs[1] hs = n.pred.newSeqWith parseInt readLine stdin var cnt = 1 for v in hs: if v > h: inc cnt let s = case cnt mod 10 of 1: "st" of 2: "nd" of 3: "rd" else: "th" echo cnt, s