結果

問題 No.820 Power of Two
ユーザー taktak
提出日時 2019-04-28 11:41:28
言語 F#
(F# 4.0)
結果
AC  
実行時間 59 ms / 2,000 ms
コード長 214 bytes
コンパイル時間 5,390 ms
コンパイル使用メモリ 165,892 KB
実行使用メモリ 26,300 KB
最終ジャッジ日時 2023-08-21 18:40:38
合計ジャッジ時間 6,649 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
24,232 KB
testcase_01 AC 59 ms
26,300 KB
testcase_02 AC 59 ms
22,128 KB
testcase_03 AC 59 ms
20,172 KB
testcase_04 AC 58 ms
22,080 KB
testcase_05 AC 58 ms
22,140 KB
testcase_06 AC 59 ms
24,212 KB
testcase_07 AC 59 ms
22,132 KB
testcase_08 AC 58 ms
22,096 KB
testcase_09 AC 58 ms
22,076 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

open System

let solve n k =
    if n < k then
        0
    else
        pown 2 (n - k)        

let N, K =
    let t = Console.ReadLine().Split() |> Array.map int
    t.[0], t.[1]

solve N K 
|> Console.WriteLine
0