結果
| 問題 |
No.1176 少ない質問
|
| コンテスト | |
| ユーザー |
masayoshi361
|
| 提出日時 | 2020-08-21 21:46:35 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 752 bytes |
| コンパイル時間 | 2,265 ms |
| コンパイル使用メモリ | 104,960 KB |
| 実行使用メモリ | 19,072 KB |
| 最終ジャッジ日時 | 2024-10-15 05:30:49 |
| 合計ジャッジ時間 | 2,170 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 WA * 1 |
コンパイルメッセージ
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 = Console.ReadLine().Split().Select(long.Parse).ToArray()[0];
long tmp = 1;
long ans;
long cnt = 0;
while(a>tmp){
tmp*=2;
cnt++;
}
ans = cnt*2;
tmp = 1;
cnt = 0;
while(tmp<a){
tmp*=3;
cnt++;
}
ans = Min(ans, cnt*3);
Console.WriteLine(ans);
}
}
masayoshi361