結果

問題 No.2241 Reach 1
ユーザー CoCo_Japan_panCoCo_Japan_pan
提出日時 2023-03-10 23:21:47
言語 C++17(gcc12)
(gcc 12.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 490 bytes
コンパイル時間 2,727 ms
コンパイル使用メモリ 198,792 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-18 05:36:09
合計ジャッジ時間 3,321 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 35
権限があれば一括ダウンロードができます

ソースコード

diff #

// 提出時にassertはオフ
#ifndef DEBUG
#ifndef NDEBUG
#define NDEBUG
#endif
#endif

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

#define ALL(x) (x).begin(), (x).end()
template <class T> using vec = vector<T>;

int N;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cin >> N;
    if((N & (- N)) == N){
        cout << 1 << "\n";
    } else if(N % 2 == 0) {
        cout << 3 << "\n";
    } else {
        cout << 2 << "\n";
    }
}
0