結果
| 問題 |
No.820 Power of Two
|
| コンテスト | |
| ユーザー |
No
|
| 提出日時 | 2019-06-20 16:09:17 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 492 bytes |
| コンパイル時間 | 890 ms |
| コンパイル使用メモリ | 107,504 KB |
| 実行使用メモリ | 26,008 KB |
| 最終ジャッジ日時 | 2024-12-17 18:41:44 |
| 合計ジャッジ時間 | 1,800 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 WA * 2 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
namespace a
{
class y
{
static void Main(string[] args)
{
var ss = Console.ReadLine().Split();
var n = int.Parse(ss[0]);
var k = int.Parse(ss[1]);
int ans = 0;
if (n > k)
{
ans = 1;
for (int i = 0; i < n - k; i++)
{
ans *= 2;
}
}
Console.WriteLine(ans);
}
}
}
No