結果

問題 No.2239 Friday
ユーザー mint
提出日時 2024-01-30 15:50:57
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 314 bytes
コンパイル時間 1,885 ms
コンパイル使用メモリ 192,868 KB
最終ジャッジ日時 2025-02-19 00:46:42
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int a, b, z = 1e9; cin >> a >> b;
    for(int i = 0; i <= min(a, b); i++){
        int x = i*2;
        int y = abs(((a+b) - x) - x);
        z = min(z, y);
    }
    cout << z << '\n';
    return 0;
}
0