結果
問題 | No.2241 Reach 1 |
ユーザー |
|
提出日時 | 2023-03-10 22:05:20 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 338 bytes |
コンパイル時間 | 3,809 ms |
コンパイル使用メモリ | 249,876 KB |
最終ジャッジ日時 | 2025-02-11 08:21:47 |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 35 |
ソースコード
#include<bits/stdc++.h> using namespace std; #include<atcoder/all> using namespace atcoder; using ll = long long; int n; void solve(){ if(n%2==1){ cout<<2<<endl; }else if(__builtin_popcount(n)==1){ cout<<1<<endl; }else{ cout<<3<<endl; } } signed main(){ cin.tie(nullptr); ios::sync_with_stdio(false); cin >> n; solve(); }