結果
問題 | No.643 Two Operations No.2 |
ユーザー |
|
提出日時 | 2022-10-04 22:19:06 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 477 bytes |
コンパイル時間 | 2,059 ms |
コンパイル使用メモリ | 192,492 KB |
最終ジャッジ日時 | 2025-02-07 21:30:14 |
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
ソースコード
#include <bits/stdc++.h> #define rep(i,n) for(int i = 0; i < (n); i++) using namespace std; typedef long long ll; int main(){ cin.tie(0); ios::sync_with_stdio(0); // X+Y=X-Y -> Y=0 int X,Y; cin >> X >> Y; if(X == Y) { cout << 0 << endl; } else if(Y == 0) { cout << 1 << endl; } else if(X == 0) { cout << 2 << endl; } else if(X + Y == 0) { cout << 3 << endl; } else { cout << -1 << endl; } }