結果

問題 No.423 ハムスター語初級(数詞)
ユーザー ichibanshiboriichibanshibori
提出日時 2016-09-22 22:57:59
言語 F#
(F# 4.0)
結果
AC  
実行時間 77 ms / 2,000 ms
コード長 409 bytes
コンパイル時間 4,776 ms
コンパイル使用メモリ 164,264 KB
実行使用メモリ 24,768 KB
最終ジャッジ日時 2023-08-11 02:48:38
合計ジャッジ時間 6,095 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
24,744 KB
testcase_01 AC 76 ms
22,688 KB
testcase_02 AC 74 ms
22,700 KB
testcase_03 AC 76 ms
22,684 KB
testcase_04 AC 76 ms
20,568 KB
testcase_05 AC 76 ms
22,576 KB
testcase_06 AC 77 ms
22,616 KB
testcase_07 AC 77 ms
24,768 KB
testcase_08 AC 75 ms
22,736 KB
testcase_09 AC 76 ms
22,712 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 () =
    let n = stdin.ReadLine ()

    let n2 = n |>
             (fun n -> n.Replace("hamu", "1")) |>
             (fun n -> n.Replace("ham", "0")) |>
             (fun n -> Convert.ToInt32(n, 2)) |>
             ( * ) 2 |>
             (fun n -> Convert.ToString(n, 2)) |>
             (fun n -> n.Replace("1", "hamu")) |>
             (fun n -> n.Replace("0", "ham"))

    printfn "%s" n2
0