結果

問題 No.638 Sum of "not power of 2"
ユーザー natoriusannatoriusan
提出日時 2023-07-31 00:36:12
言語 F#
(F# 4.0)
結果
WA  
実行時間 -
コード長 251 bytes
コンパイル時間 7,363 ms
コンパイル使用メモリ 187,316 KB
実行使用メモリ 34,748 KB
最終ジャッジ日時 2024-04-18 01:41:58
合計ジャッジ時間 10,865 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
30,080 KB
testcase_01 AC 54 ms
30,336 KB
testcase_02 AC 59 ms
30,336 KB
testcase_03 AC 52 ms
30,208 KB
testcase_04 AC 295 ms
34,068 KB
testcase_05 AC 57 ms
30,080 KB
testcase_06 AC 303 ms
33,684 KB
testcase_07 AC 293 ms
33,736 KB
testcase_08 AC 298 ms
34,196 KB
testcase_09 AC 290 ms
33,948 KB
testcase_10 AC 293 ms
34,232 KB
testcase_11 WA -
testcase_12 AC 56 ms
30,080 KB
testcase_13 AC 290 ms
34,748 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (222 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

let n = stdin.ReadLine () |> int64

if n < 8L then
    if n = 6L then
        3, n-3L
    else
        -1, 0L
else
    if n % 4L = 3L then
        5, n-5L
    else
        3, n-3L
|> (fun (a, b) -> if a = -1 then printfn "-1" else printfn "%d %d" a b)
0