結果

問題 No.2239 Friday
ユーザー GlinTFrauleinGlinTFraulein
提出日時 2023-03-10 21:35:23
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 578 bytes
コンパイル時間 4,255 ms
コンパイル使用メモリ 262,272 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-18 07:17:31
合計ジャッジ時間 5,032 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
 
#define elif else if
#define ll long long
#define vll vector<long long>
#define vec vector
#define embk emplace_back
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep3(i, n, k) for (int i = k; i < n; i++)
#define all(a) a.begin(), a.end()
 
using namespace std;
using namespace atcoder;
const ll INF = 1LL << 60;
const ll mod = 998244353;

int main() {
  ll a, b; cin >> a >> b;
  if (a == b) {
    if (a % 2 == 0) cout << 0 << endl;
    else cout << 2 << endl;
  }
  else cout << abs((a+b) - min(a,b) * 4) << endl;
  
}
0