結果
問題 |
No.661 ハローキティはりんご3個分
|
ユーザー |
![]() |
提出日時 | 2018-05-14 23:19:58 |
言語 | Go (1.23.4) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 498 bytes |
コンパイル時間 | 12,414 ms |
コンパイル使用メモリ | 228,096 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-28 11:52:01 |
合計ジャッジ時間 | 12,918 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 |
ソースコード
package main import ( "bufio" "fmt" "os" "strconv" ) var sc = bufio.NewScanner(os.Stdin) func nextInt() int { sc.Scan() i, err := strconv.Atoi(sc.Text()) if err != nil { panic(err) } return i } func main() { sc.Split(bufio.ScanWords) i := nextInt() for j := 0; j < i; j++ { n := nextInt() if n%8 == 0 && n%10 == 0 { fmt.Println("ikisugi") } else if n%8 == 0 { fmt.Println("iki") } else if n%10 == 0 { fmt.Println("sugi") } else { fmt.Println(n / 3) } } }