結果
問題 | No.1176 少ない質問 |
ユーザー |
![]() |
提出日時 | 2020-12-07 14:36:40 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 311 bytes |
コンパイル時間 | 1,397 ms |
コンパイル使用メモリ | 165,460 KB |
実行使用メモリ | 6,940 KB |
最終ジャッジ日時 | 2024-09-17 13:54:01 |
合計ジャッジ時間 | 2,180 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 WA * 1 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main(){long long A;cin >> A;long long ans = 0;long long mul = 1;long long n = 0;while( mul < A ) {mul *= 2;n++;}ans = n * 2;mul = 1;n = 0;while( mul < A ) {mul *= 3;n++;}ans = min( ans, n * 3 );cout << ans << endl;}