結果

問題 No.231 めぐるはめぐる (1)
ユーザー GoryudyumaGoryudyuma
提出日時 2015-06-29 16:17:47
言語 Go
(1.22.1)
結果
WA  
実行時間 -
コード長 1,036 bytes
コンパイル時間 12,462 ms
コンパイル使用メモリ 230,880 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-19 02:28:55
合計ジャッジ時間 14,742 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 2 ms
5,248 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 3 ms
5,376 KB
testcase_06 AC 4 ms
5,376 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 1 ms
5,376 KB
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
                }
        }
}
0