結果

問題 No.8 N言っちゃダメゲーム
ユーザー tsuchinaga
提出日時 2019-05-13 09:37:49
言語 Go
(1.23.4)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 426 bytes
コンパイル時間 15,022 ms
コンパイル使用メモリ 222,256 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-06 19:50:04
合計ジャッジ時間 11,137 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

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