結果
| 問題 |
No.47 ポケットを叩くとビスケットが2倍
|
| コンテスト | |
| ユーザー |
irogane
|
| 提出日時 | 2019-06-26 11:50:30 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 392 bytes |
| コンパイル時間 | 2,025 ms |
| コンパイル使用メモリ | 108,868 KB |
| 実行使用メモリ | 28,096 KB |
| 最終ジャッジ日時 | 2024-06-24 15:56:36 |
| 合計ジャッジ時間 | 3,159 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | AC * 1 WA * 20 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
public class No47 {
public static void Main() {
int bis = int.Parse(Console.ReadLine());
int count = 0;
int temp = 0;
int now = 1;
while( now != bis ){
temp = 1;
while( (temp * 2) + now < bis ){
temp*= 2;
count++;
}
now+= temp;
}
Console.WriteLine(count);
}
}
irogane