結果

問題 No.2241 Reach 1
ユーザー GlinTFraulein
提出日時 2023-03-10 22:31:27
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 593 bytes
コンパイル時間 4,025 ms
コンパイル使用メモリ 249,488 KB
最終ジャッジ日時 2025-02-11 08:43:32
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 35
権限があれば一括ダウンロードができます

ソースコード

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 n; cin >> n;
  rep3(i, 31, 1) {
    if (n == (1LL << i)) {
      cout << 1 << endl;
      return 0;
    }
  }
  if (n % 2 == 0) cout << 3 << endl;
  else cout << 2 << endl;
  
}
0