結果

問題 No.304 鍵(1)
ユーザー yukirinyukirin
提出日時 2016-01-19 01:06:06
言語 Go
(1.22.1)
結果
AC  
実行時間 69 ms / 2,000 ms
コード長 936 bytes
コンパイル時間 14,065 ms
コンパイル使用メモリ 208,344 KB
実行使用メモリ 24,228 KB
平均クエリ数 309.17
最終ジャッジ日時 2023-09-23 23:06:32
合計ジャッジ時間 15,177 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
24,168 KB
testcase_01 AC 31 ms
24,228 KB
testcase_02 AC 69 ms
24,228 KB
testcase_03 AC 30 ms
23,652 KB
testcase_04 AC 48 ms
23,676 KB
testcase_05 AC 30 ms
24,228 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

// var rdr = bufio.NewReaderSize(os.Stdin, 1000000)

func nextLine() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	i, _ := strconv.Atoi(nextLine())
	return i
}

func nextInt64() int64 {
	i, _ := strconv.ParseInt(nextLine(), 10, 64)
	return i
}

func nextUint64() uint64 {
	i, _ := strconv.ParseUint(nextLine(), 10, 64)
	return i
}

func nextFloat() float64 {
	f, _ := strconv.ParseFloat(nextLine(), 64)
	return f
}

// func readLine() string {
// buf := make([]byte, 0, 1000000)
// for {
// l, p, e := rdr.ReadLine()
// if e != nil {
// panic(e)
// }
// buf = append(buf, l...)
// if !p {
// break
// }
// }
// return string(buf)
// }

func main() {
	sc.Split(bufio.ScanWords)

	for i := 0; i < 1000; i++ {
		fmt.Fprintf(os.Stdout, "%03d\n", i)
		os.Stdout.Sync()
		l := nextLine()
		if l == "unlocked" {
			break
		}
	}
}
0