結果

問題 No.231 めぐるはめぐる (1)
ユーザー GoryudyumaGoryudyuma
提出日時 2015-06-29 16:23:30
言語 Go
(1.21.3)
結果
AC  
実行時間 14 ms / 1,000 ms
コード長 1,037 bytes
コンパイル時間 12,355 ms
コンパイル使用メモリ 203,056 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-07 18:41:59
合計ジャッジ時間 12,486 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

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

ソースコード

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() {
        var G, D, N int
        fmt.Scan(&N)
        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