結果
問題 |
No.1176 少ない質問
|
ユーザー |
![]() |
提出日時 | 2020-08-21 21:36:50 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 723 bytes |
コンパイル時間 | 805 ms |
コンパイル使用メモリ | 103,680 KB |
実行使用メモリ | 17,664 KB |
最終ジャッジ日時 | 2024-10-15 05:21:12 |
合計ジャッジ時間 | 2,039 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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); } }