結果

問題 No.8 N言っちゃダメゲーム
コンテスト
ユーザー tsuchinaga
提出日時 2019-05-13 09:37:49
言語 Go
(1.26.1)
コンパイル:
env GOCACHE=/tmp go build _filename_
実行:
./Main
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 426 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 14,624 ms
コンパイル使用メモリ 275,356 KB
実行使用メモリ 6,144 KB
最終ジャッジ日時 2026-03-28 09:49:42
合計ジャッジ時間 15,291 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

package main

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

func main() {
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)

	var p, n, k int
	sc.Scan()
	p, _ = strconv.Atoi(sc.Text())
	for i := 0; i < p; i++ {
		sc.Scan()
		n, _ = strconv.Atoi(sc.Text())
		sc.Scan()
		k, _ = strconv.Atoi(sc.Text())

		l := (n - 1) % (k + 1)
		if l != 0 && l <= k {
			fmt.Println("Win")
		} else {
			fmt.Println("Lose")
		}
	}
}
0