結果
問題 |
No.231 めぐるはめぐる (1)
|
ユーザー |
|
提出日時 | 2015-06-29 16:17:47 |
言語 | Go (1.23.4) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,036 bytes |
コンパイル時間 | 11,667 ms |
コンパイル使用メモリ | 240,496 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-10 19:08:11 |
合計ジャッジ時間 | 14,297 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 4 WA * 7 |
ソースコード
package main import ( "bufio" "fmt" "os" "strconv" ) func nextInt() int { i, e := strconv.Atoi(nextString()) if e != nil { panic(e) } return i } func nextFloat() float64 { f, e := strconv.ParseFloat(nextString(), 64) if e != nil { panic(e) } return f } func nextString() string { var sc = bufio.NewScanner(os.Stdin) sc.Split(bufio.ScanWords) sc.Scan() return sc.Text() } func main() { N := nextInt() var G, D int f := -1 for i := 0; i < N; i++ { fmt.Scan(&G) fmt.Scan(&D) if (G-30000*D)*6 >= 3000000 && f == -1 { f = i + 1 } } if f == -1 { fmt.Println("NO") } else { fmt.Println("YES") for i := 0; i < 6; i++ { fmt.Println(f) } } }