結果
問題 | No.1176 少ない質問 |
ユーザー |
|
提出日時 | 2020-08-21 21:51:46 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 1,000 ms |
コード長 | 404 bytes |
コンパイル時間 | 2,236 ms |
コンパイル使用メモリ | 190,788 KB |
最終ジャッジ日時 | 2025-01-13 05:41:32 |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
#include <bits/stdc++.h>using namespace std;using ll=long long;int main() {ll A;cin >> A;if(A<=5){cout << A << endl;return 0;}ll num = 1;ll ans2 = 0;while(num<A){num*=2;ans2 += 2;}num = 1;ll ans3 = 0;while(num<A){num*=3;ans3 += 3;}cout << min(ans2,ans3) << endl;return 0;}