結果

問題 No.396 クラス替え
ユーザー compass19compass19
提出日時 2016-07-15 23:04:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 264 bytes
コンパイル時間 142 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 17,696 KB
最終ジャッジ日時 2024-04-23 05:02:34
合計ジャッジ時間 4,371 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
17,696 KB
testcase_01 AC 27 ms
10,880 KB
testcase_02 AC 26 ms
10,880 KB
testcase_03 AC 26 ms
10,880 KB
testcase_04 AC 26 ms
10,880 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 TLE -
testcase_09 TLE -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = list(map(int,input().split()))
x = list(map(int,input().split()))

def cla(x, i=0, j=0):
	while i < x:
		i = i + n[1]
		j = j+1
	j = j%2
	if j == 1:
		return(x%n[1])
	else:
		return((n[1]-x%n[1]+1)%4)
if cla(x[0]) == cla(x[1]):
	print('YES')
else:
	print('NO')
0