結果

問題 No.784 「,(カンマ)」
ユーザー chike_pluschike_plus
提出日時 2019-03-08 01:58:22
言語 F#
(F# 4.0)
結果
AC  
実行時間 78 ms / 2,000 ms
コード長 381 bytes
コンパイル時間 4,648 ms
コンパイル使用メモリ 163,876 KB
実行使用メモリ 24,648 KB
最終ジャッジ日時 2023-09-05 19:32:31
合計ジャッジ時間 5,596 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
20,504 KB
testcase_01 AC 77 ms
24,568 KB
testcase_02 AC 76 ms
22,584 KB
testcase_03 AC 75 ms
22,604 KB
testcase_04 AC 76 ms
24,644 KB
testcase_05 AC 75 ms
24,648 KB
testcase_06 AC 75 ms
22,564 KB
testcase_07 AC 77 ms
24,504 KB
testcase_08 AC 76 ms
22,520 KB
testcase_09 AC 75 ms
22,612 KB
testcase_10 AC 77 ms
22,740 KB
testcase_11 AC 76 ms
22,616 KB
testcase_12 AC 76 ms
22,512 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 arg = Console.ReadLine()

let separate (arg:string) =
  let rec splitStr (argStr:string) =
    match argStr.Length with
    | 0 -> ""
    | 1 | 2 | 3 -> argStr
    | _ -> argStr.Substring(0, (argStr.Length-3)) 
          |> splitStr  
          |> (fun split -> split + "," + argStr.Substring(argStr.Length-3))
  
  splitStr (arg)
  
printfn "%s" (arg |> separate)
0