結果

問題 No.820 Power of Two
ユーザー bluemeganebluemegane
提出日時 2019-04-27 17:38:38
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 23 ms / 2,000 ms
コード長 294 bytes
コンパイル時間 3,099 ms
コンパイル使用メモリ 107,372 KB
実行使用メモリ 26,452 KB
最終ジャッジ日時 2024-11-28 18:48:27
合計ジャッジ時間 2,757 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます
コンパイルメッセージ
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