結果
問題 |
No.8 N言っちゃダメゲーム
|
ユーザー |
![]() |
提出日時 | 2019-05-13 09:26:26 |
言語 | Go (1.23.4) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 447 bytes |
コンパイル時間 | 14,869 ms |
コンパイル使用メモリ | 236,208 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-06 15:48:59 |
合計ジャッジ時間 | 13,929 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
ソースコード
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 = n - 1 } if l <= k { fmt.Println("Win") } else { fmt.Println("Lose") } } }