結果
問題 | No.570 3人兄弟(その1) |
ユーザー |
![]() |
提出日時 | 2017-11-22 10:27:55 |
言語 | Go (1.23.4) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 574 bytes |
コンパイル時間 | 10,592 ms |
コンパイル使用メモリ | 226,376 KB |
実行使用メモリ | 6,816 KB |
最終ジャッジ日時 | 2024-11-26 11:04:58 |
合計ジャッジ時間 | 11,085 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 5 |
ソースコード
package main import( "fmt" "sort" ) func output(ele int, heightMap map[string]int){ if ele == heightMap["A"]{ fmt.Println("A") } else if ele == heightMap["B"]{ fmt.Println("B") } else if ele == heightMap["C"]{ fmt.Println("C") } } func main(){ var heightA, heightB, heightC int fmt.Scan(&heightA, &heightB, &heightC) heightList := []int{heightA, heightB, heightC} sort.Sort(sort.IntSlice(heightList)) heightMap := map[string]int{"A": heightA, "B": heightB, "C": heightC} for i := len(heightList) - 1; i >= 0; i--{ output(heightList[i], heightMap) } }