結果
問題 | No.85 TVザッピング(1) |
ユーザー |
|
提出日時 | 2015-03-10 06:22:29 |
言語 | Go1.4 (1.4.2) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 581 bytes |
コンパイル時間 | 3,104 ms |
コンパイル使用メモリ | 32,384 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-04 17:22:06 |
合計ジャッジ時間 | 3,910 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
ソースコード
package main import ( "bufio" "os" "strconv" "fmt" ) var s = bufio.NewScanner(os.Stdin) func next() string { s.Split(bufio.ScanWords) 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() { N := nextInt() M := nextInt() _ = nextInt() out := "YES" if N*M == 2 { //nop }else if (N == 1 || M == 1 || N%2 == 1 && M%2 == 1) { out = "NO" }else { //nop } fmt.Println(out) }