結果
| 問題 |
No.1176 少ない質問
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-08-21 22:29:24 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 398 bytes |
| コンパイル時間 | 1,394 ms |
| コンパイル使用メモリ | 167,304 KB |
| 実行使用メモリ | 13,824 KB |
| 最終ジャッジ日時 | 2024-10-15 05:57:18 |
| 合計ジャッジ時間 | 5,744 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 -- * 20 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
long long A;cin>>A;
vector<int>V{1,2,3,4,5,6,6,6,6,8,8,8,8,8,8,8};
if(A<17){
cout<<V[A-1]<<endl;
}
else if(A>26&&A<33){
cout<<10<<endl;
}
else{
int M=0;
for(int X=1;;X*=3){
if(X>=A){
cout<<M*3<<endl;break;
}
M++;
}
}
}