結果

問題 No.784 「,(カンマ)」
ユーザー chike_pluschike_plus
提出日時 2019-03-08 07:14:33
言語 F#
(F# 4.0)
結果
AC  
実行時間 81 ms / 2,000 ms
コード長 349 bytes
コンパイル時間 3,519 ms
コンパイル使用メモリ 161,132 KB
実行使用メモリ 24,656 KB
最終ジャッジ日時 2023-09-05 19:33:08
合計ジャッジ時間 5,405 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
22,668 KB
testcase_01 AC 79 ms
24,656 KB
testcase_02 AC 79 ms
22,608 KB
testcase_03 AC 80 ms
22,556 KB
testcase_04 AC 81 ms
24,640 KB
testcase_05 AC 80 ms
22,596 KB
testcase_06 AC 78 ms
22,632 KB
testcase_07 AC 78 ms
22,600 KB
testcase_08 AC 79 ms
22,672 KB
testcase_09 AC 79 ms
22,640 KB
testcase_10 AC 78 ms
22,668 KB
testcase_11 AC 78 ms
22,588 KB
testcase_12 AC 79 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 separateStr (arg:string) =
  let rec splitStr  (acc) (argStr:string) = 
    match argStr.Length with
    | 0 | 1 | 2 | 3 -> argStr + acc
    | _ -> argStr.Substring(0, argStr.Length-3)
           |> splitStr  ("," +  argStr.Substring(argStr.Length-3) + acc) 
  splitStr "" arg
  
Console.ReadLine() 
|> separateStr  
|> printfn "%s"
0