我写了一个相当不错的快速代码:
using System;
using System.Globalization;
namespace OneProgram
{
class Program
{
static void Main(string[] args)
{
double num = double.Parse(Console.ReadLine());
Console.WriteLine(num.ToString("N0", new CultureInfo("en-us")));
}
}
}
一切都会好起来的,但是如果你输入一个大于 UInt64 的数字(在条件下,数字不大于 10 ^ 100),那么结果是

是否有可能在没有循环的情况下克服它等?
这是整个任务: http: //informatics.mccme.ru/moodle/mod/statements/view.php ?chapterid=1599
我们通过线
在这里测试 - https://ideone.com/FDTl5Q
是的,我会在答案中补充一点,我展示了使用线条的想法,你的任务是让解决方案通过所有测试。
向项目添加 System.Numerics 引用并使用标准
BigInteger测试: