結果

問題 No.795 Restrictions!!!!!!!!!!!!!!
ユーザー tsuchinagatsuchinaga
提出日時 2019-03-18 12:25:32
言語 Go
(1.22.1)
結果
AC  
実行時間 54 ms / 2,000 ms
コード長 434 bytes
コンパイル時間 11,577 ms
コンパイル使用メモリ 208,296 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-25 07:14:48
合計ジャッジ時間 13,994 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
4,380 KB
testcase_01 AC 53 ms
4,380 KB
testcase_02 AC 53 ms
4,380 KB
testcase_03 AC 52 ms
4,376 KB
testcase_04 AC 53 ms
4,376 KB
testcase_05 AC 53 ms
4,376 KB
testcase_06 AC 52 ms
4,380 KB
testcase_07 AC 53 ms
4,376 KB
testcase_08 AC 53 ms
4,376 KB
testcase_09 AC 53 ms
4,376 KB
testcase_10 AC 53 ms
4,380 KB
testcase_11 AC 52 ms
4,380 KB
testcase_12 AC 52 ms
4,380 KB
testcase_13 AC 54 ms
4,380 KB
testcase_14 AC 53 ms
4,376 KB
testcase_15 AC 53 ms
4,376 KB
testcase_16 AC 53 ms
4,380 KB
testcase_17 AC 53 ms
4,380 KB
testcase_18 AC 53 ms
4,376 KB
testcase_19 AC 54 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import "fmt"

func main() {
	var n, m int
	_, _ = fmt.Scan(&n, &m)

	// まず100円玉を両者に同じ数だけ配る
	n %= 2

	// 100円玉が残っていれば、片方に100円玉を渡して、もう片方に10円玉を10枚渡す
	if n > 0 {
		n, m = 0, m-10
	}

	// 10円玉が0以上の偶数なら可能、出なければ不可
	if m >= 0 && m%2 == 0 {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}
0