結果

問題 No.643 Two Operations No.2
ユーザー 👑 CleyLCleyL
提出日時 2022-08-10 00:01:28
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 312 bytes
コンパイル時間 495 ms
コンパイル使用メモリ 66,332 KB
最終ジャッジ日時 2025-01-30 19:54:14
ジャッジサーバーID
(参考情報)
judge3 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
int main(){
    int a,b;cin>>a>>b;
    if(a==b){
        cout << 0 << endl;
    }else if(b == 0){
        cout << 1 << endl;
    }else if(a == 0){
        cout << 2 << endl;
    }else if(a+b == 0){
        cout << 3 << endl;
    }else{
        cout << -1 << endl;
    }
}
0