結果
問題 | No.784 「,(カンマ)」 |
ユーザー |
|
提出日時 | 2019-05-22 19:46:46 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 24 ms / 2,000 ms |
コード長 | 583 bytes |
コンパイル時間 | 2,054 ms |
コンパイル使用メモリ | 107,076 KB |
実行使用メモリ | 25,648 KB |
最終ジャッジ日時 | 2024-09-17 09:39:10 |
合計ジャッジ時間 | 1,824 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Text.RegularExpressions; namespace ConsoleApp2 { class Program { static void Main(string[] args) { string n = Console.ReadLine(); Console.WriteLine(separate(n)); } static string separate(string num) { int len = num.Length; if(len > 3) { return separate(num.Substring(0, len - 3)) + ',' + num.Substring(len - 3); } else { return num; } } } }