結果
問題 |
No.1176 少ない質問
|
ユーザー |
|
提出日時 | 2020-08-21 22:17:46 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 284 bytes |
コンパイル時間 | 1,381 ms |
コンパイル使用メモリ | 165,412 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-15 05:49:25 |
合計ジャッジ時間 | 2,061 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
#include<bits/stdc++.h> #define int long long using namespace std; signed main(){ int A; cin>>A; if(A==5){ puts("5"); return 0; } int n=1,cnt1=0,m=1,cnt2=0; while(n<A)n*=2,cnt1++; while(m<A)m*=3,cnt2++; cout<<min(2*cnt1,3*cnt2)<<endl; }