結果
| 問題 |
No.47 ポケットを叩くとビスケットが2倍
|
| ユーザー |
hayashi
|
| 提出日時 | 2019-10-11 14:47:01 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 566 bytes |
| コンパイル時間 | 784 ms |
| コンパイル使用メモリ | 110,192 KB |
| 実行使用メモリ | 27,712 KB |
| 最終ジャッジ日時 | 2024-11-24 15:49:58 |
| 合計ジャッジ時間 | 2,167 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 WA * 8 |
コンパイルメッセージ
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.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace algo {
class Program
{
static void Main(string[] args)
{
int N = int.Parse(Console.ReadLine()); //.Split(' ');
int ans = 0;
if(N % 2 == 1)
{
N = N - 1;
ans++;
}
for(int i = 1; i < N;)
{
i *= 2;
ans++;
}
Console.WriteLine(ans);
}
}
}
hayashi