結果
問題 | No.2241 Reach 1 |
ユーザー |
|
提出日時 | 2023-03-10 21:47:22 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 308 bytes |
コンパイル時間 | 774 ms |
コンパイル使用メモリ | 65,528 KB |
最終ジャッジ日時 | 2025-02-11 08:07:59 |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 35 |
ソースコード
#include <iostream> using namespace std; int main() { int n; cin >> n; if (n % 2) { cout << 2 << endl; return 0; } while (n % 2 == 0) { n /= 2; } if (n == 1) { cout << 1 << endl; } else { cout << 3 << endl; } }