結果

問題 No.411 昇順昇順ソート
ユーザー ixTL255
提出日時 2016-08-19 21:45:44
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 30 ms / 2,000 ms
コード長 335 bytes
コンパイル時間 2,158 ms
コンパイル使用メモリ 106,368 KB
実行使用メモリ 20,352 KB
最終ジャッジ日時 2024-11-07 18:44:27
合計ジャッジ時間 4,193 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 30
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Linq;
using System.Collections.Generic;

public class Test
{
	public static void Main()
	{
		var x = Console.ReadLine()
				.Split(' ')
				.Select(n => int.Parse(n))
				.ToList();
		
		if (x[1] == 1) Console.WriteLine(Math.Pow(2, x[0] -x[1]) - x[0]);
		else Console.WriteLine(Math.Pow(2, x[0] -x[1]));
	}
}
0