結果

問題 No.643 Two Operations No.2
ユーザー 双六双六
提出日時 2020-08-19 04:50:31
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 99 ms / 2,000 ms
コード長 414 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 86,848 KB
実行使用メモリ 71,816 KB
最終ジャッジ日時 2023-08-02 08:35:05
合計ジャッジ時間 2,273 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 99 ms
71,632 KB
testcase_01 AC 96 ms
71,752 KB
testcase_02 AC 94 ms
71,488 KB
testcase_03 AC 93 ms
71,552 KB
testcase_04 AC 94 ms
71,772 KB
testcase_05 AC 93 ms
71,580 KB
testcase_06 AC 94 ms
71,588 KB
testcase_07 AC 92 ms
71,412 KB
testcase_08 AC 91 ms
71,816 KB
testcase_09 AC 93 ms
71,636 KB
testcase_10 AC 93 ms
71,512 KB
testcase_11 AC 92 ms
71,528 KB
testcase_12 AC 93 ms
71,564 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys; input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	X, Y = getlist()
	if X == Y:
		print(0)
	elif Y == 0:
		print(1)
	elif X == 0:
		print(2)
	elif abs(X) == abs(Y):
		print(3)
	else:
		print(-1)



if __name__ == '__main__':
	main()
0