結果

問題 No.820 Power of Two
ユーザー bluemeganebluemegane
提出日時 2019-04-27 17:38:38
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 52 ms / 2,000 ms
コード長 294 bytes
コンパイル時間 4,025 ms
コンパイル使用メモリ 100,564 KB
実行使用メモリ 23,348 KB
最終ジャッジ日時 2023-08-19 05:11:06
合計ジャッジ時間 4,729 ms
ジャッジサーバーID
(参考情報)
judge11 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
20,944 KB
testcase_01 AC 48 ms
20,676 KB
testcase_02 AC 50 ms
21,248 KB
testcase_03 AC 51 ms
22,980 KB
testcase_04 AC 52 ms
20,876 KB
testcase_05 AC 50 ms
21,200 KB
testcase_06 AC 49 ms
23,348 KB
testcase_07 AC 50 ms
21,296 KB
testcase_08 AC 51 ms
22,884 KB
testcase_09 AC 49 ms
21,172 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using static System.Math;
using System;

public class Hello
{
    static void Main()
    {
        string[] line = Console.ReadLine().Trim().Split(' ');
        var n = int.Parse(line[0]);
        var k = int.Parse(line[1]);
        Console.WriteLine(n >= k ? (int)Pow(2, n - k) : 0);
    }
}

0