結果
| 問題 | No.564 背の順 | 
| コンテスト | |
| ユーザー |  tsuchinaga | 
| 提出日時 | 2019-02-22 12:19:03 | 
| 言語 | Go (1.23.4) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 303 bytes | 
| コンパイル時間 | 15,601 ms | 
| コンパイル使用メモリ | 242,032 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-11-24 04:43:16 | 
| 合計ジャッジ時間 | 11,827 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 9 | 
ソースコード
package main
import (
	"fmt"
)
func main() {
	var h, n, m int
	_, _ = fmt.Scan(&m, &n)
	cnt := 1
	for i := 0; i < n-1; i++ {
		_, _ = fmt.Scan(&h)
		if h > m {
			cnt++
		}
	}
	d := "th"
	switch cnt % 10 {
	case 1:
		d = "st"
	case 2:
		d = "nd"
	case 3:
		d = "rd"
	}
	fmt.Printf("%d%s", cnt, d)
}
            
            
            
        