結果

問題 No.643 Two Operations No.2
ユーザー sggkshiosggkshio
提出日時 2019-12-10 02:09:59
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 593 bytes
コンパイル時間 648 ms
コンパイル使用メモリ 81,024 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-05 17:25:48
合計ジャッジ時間 1,482 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#define _USE_MATH_DEFINES
#include  <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <string>
#include<math.h>
#include<iomanip>
#include<stdio.h>
#include <stdlib.h>
#include<stdio.h>
#include <queue>
#include<map>
#include <sstream>
#include<set>
#include<stack>

//#include<bits/stdc++.h>


using namespace std;



int main() {
	
	int a, b;
	cin >> a >> b;
	if (a == b) {
		cout << 0 << endl;
		return 0;
	}
	if (abs(a) != abs(b)) {
		cout << -1 << endl;
		return 0;
	}

	if (!b)cout << 1 << endl;
	if (!a)cout << 2 << endl;


	return 0;


		
}
0