結果
| 問題 | 
                            No.1176 少ない質問
                             | 
                    
| コンテスト | |
| ユーザー | 
                             masayoshi361
                         | 
                    
| 提出日時 | 2020-08-21 21:33:21 | 
| 言語 | C#(csc)  (csc 3.9.0)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 723 bytes | 
| コンパイル時間 | 832 ms | 
| コンパイル使用メモリ | 108,044 KB | 
| 実行使用メモリ | 25,556 KB | 
| 最終ジャッジ日時 | 2024-10-15 05:16:35 | 
| 合計ジャッジ時間 | 2,048 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | WA * 1 RE * 20 | 
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static System.Math;class Program
{
	
	static void Main(string[] args)
	{
        //var exStdIn = new System.IO.StreamReader( "stdin.txt" );System.Console.SetIn( exStdIn );
		//const long inf = 100000000000000;
		long a = int.Parse(Console.ReadLine());
		long tmp = a;
		long ans;
		long cnt = 0;
		while(tmp>0){
			tmp/=2;
			cnt++;
		}
		ans = cnt*2;
		tmp = a;
		cnt = 0;
		while(tmp>0){
			tmp/=3;
			cnt++;
		}
		ans = Min(ans, cnt*3);
		Console.WriteLine(ans);
	}
}
            
            
            
        
            
masayoshi361