結果

問題 No.560 ふしぎなナップサック
ユーザー mbanmban
提出日時 2017-08-26 11:37:44
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 29 ms / 2,000 ms
コード長 477 bytes
コンパイル時間 891 ms
コンパイル使用メモリ 110,500 KB
実行使用メモリ 26,796 KB
最終ジャッジ日時 2024-04-23 17:06:46
合計ジャッジ時間 1,644 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
24,928 KB
testcase_01 AC 29 ms
24,540 KB
testcase_02 AC 24 ms
24,620 KB
testcase_03 AC 22 ms
22,068 KB
testcase_04 AC 23 ms
26,708 KB
testcase_05 AC 23 ms
22,840 KB
testcase_06 AC 22 ms
24,676 KB
testcase_07 AC 22 ms
24,800 KB
testcase_08 AC 23 ms
24,932 KB
testcase_09 AC 23 ms
24,752 KB
testcase_10 AC 25 ms
26,792 KB
testcase_11 AC 25 ms
24,548 KB
testcase_12 AC 23 ms
26,796 KB
testcase_13 AC 24 ms
24,540 KB
testcase_14 AC 24 ms
26,668 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

static class Program{
    static void Main(){
        new Magatro().Solve();
    }
}

class Magatro{
    public void Solve(){
        string[]line = Console.ReadLine().Split(' ');
        double M = double.Parse(line[0]);
        int N = int.Parse(line[1]);
        for(int i = 0;i<N;i++){
            double one = M+1;
            double two = M*2;
            double three = 0;
            M = (one+two+three)/3;
        }
        Console.WriteLine(M);
    }
}
0