結果
問題 | No.2241 Reach 1 |
ユーザー |
![]() |
提出日時 | 2023-03-10 21:56:54 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 12 ms / 2,000 ms |
コード長 | 635 bytes |
コンパイル時間 | 3,788 ms |
コンパイル使用メモリ | 250,328 KB |
最終ジャッジ日時 | 2025-02-11 08:16:12 |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 35 |
ソースコード
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; using ll=long long; using ld=long double; ld pie=3.141592653589793; ll inf=155550555555555; ll mod=1000000007; int main(){ ll n; cin >> n; vector<ll>two(50,1); for (ll i = 1; i < 50; i++) { two[i]=two[i-1]*2; } bool ok=false; for (ll i = 0; i < 50; i++) { if (two[i]==n) { ok=true; break; } } if (ok) { cout << 1 << endl; }else if (n%2) { cout << 2 << endl; }else{ cout << 3 << endl; } }