提出 #57311790
ソースコード 拡げる
#include <bits/stdc++.h>
using namespace std;
#define fio ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL)
#define int long long
#define ull unsigned long long
#define pie acos(-1)
#define gcd(a, b) __gcd(a, b)
#define lcm(a, b) (a * (b / gcd(a, b)))
const long long mod = 998244353;
// 8 * j J
void solve()
{
int a,b;cin>>a>>b;
if(a==b)cout<<1<<endl;
else if((abs(a-b))%2!=0)cout<<2<<endl;
else cout<<3<<endl;
}
int32_t main()
{
fio;
#ifdef _Local
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
int T = 1;
//cin >> T;
for (int __ = 1; __ <= T; __++)
{
solve();
}
return 0;
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | A - 369 |
| ユーザ | Rakibul_cste15 |
| 言語 | C++ 20 (gcc 12.2) |
| 得点 | 100 |
| コード長 | 700 Byte |
| 結果 | AC |
| 実行時間 | 1 ms |
| メモリ | 3624 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 100 / 100 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt |
| All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 02_handmade_00.txt, 02_handmade_01.txt, 02_handmade_02.txt, 02_handmade_03.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 00_sample_00.txt | AC | 1 ms | 3440 KiB |
| 00_sample_01.txt | AC | 1 ms | 3548 KiB |
| 00_sample_02.txt | AC | 1 ms | 3360 KiB |
| 01_random_00.txt | AC | 1 ms | 3484 KiB |
| 01_random_01.txt | AC | 1 ms | 3420 KiB |
| 01_random_02.txt | AC | 1 ms | 3408 KiB |
| 01_random_03.txt | AC | 1 ms | 3556 KiB |
| 01_random_04.txt | AC | 1 ms | 3416 KiB |
| 02_handmade_00.txt | AC | 1 ms | 3624 KiB |
| 02_handmade_01.txt | AC | 1 ms | 3492 KiB |
| 02_handmade_02.txt | AC | 1 ms | 3548 KiB |
| 02_handmade_03.txt | AC | 1 ms | 3488 KiB |