还是好好用 C++/C 吧
by int32 @ 2021-10-07 20:42:55
@[加载中Loading](/user/103751)
```
int.TryParse(Console.ReadLine(), out int count);
int[] items = new int[count];
string fuckContent = Console.In.ReadToEnd();
string[] array = fuckContent.Trim().Split(' ', '\n');
int point = 0;
for (int i = 0; i < array.Length && point < count; i++)
{
string itemStr = array[i];
if (string.IsNullOrWhiteSpace(itemStr))
continue;
if (int.TryParse(itemStr, out items[point]))
point++;
}
```
在落谷,要学会隐忍...
模拟指针,手操字符串打断,就差状态机解析数字了。这真的入门?
by Mesmer @ 2021-10-20 22:05:31
你学C#了?
by wyxdrqc @ 2021-10-28 15:58:52
@[Mesmer](/user/327499) 666
by 13813675795hzq @ 2022-10-13 18:03:20