結果
| 問題 | No.85 TVザッピング(1) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-03-10 06:16:23 |
| 言語 | Go (1.25.5) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 693 bytes |
| 記録 | |
| コンパイル時間 | 12,807 ms |
| コンパイル使用メモリ | 232,720 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2026-01-01 17:46:45 |
| 合計ジャッジ時間 | 14,178 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 WA * 5 |
ソースコード
package main
import (
"bufio"
"os"
"strconv"
"fmt"
)
var s = bufio.NewScanner(os.Stdin)
func next() string {
// s.Split(bufio.ScanWords) // 削除: Scan後に呼ぶとPanicになるため
s.Scan()
return s.Text()
}
func nextInt() int {
i, e := strconv.Atoi(next())
if e != nil {
panic(e)
}
return i
}
func nextLong() int64 {
i, e := strconv.ParseInt(next(), 10, 64)
if e != nil {
panic(e)
}
return i
}
func main() {
// Scan開始前にSplitを設定しないとPanicになるため、ここに移動
s.Split(bufio.ScanWords)
N := nextInt()
M := nextInt()
_ = nextInt()
if N*M == 2 || N%2 == 0 || M%2 == 0 {
fmt.Println("YES")
}else {
fmt.Println("NO")
}
}