Lang:C#
Edit12345678910111213141516171819202122232425262728293031using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{#region IO Class/// <summary> IO Class </summary>public class IOClass{private readonly string[] array;private int f;public IOClass(string chs = "\r\n "){#if DeskTopTextstring content = System.IO.File.ReadAllText(@"C:\Users\" + Environment.UserName + @"\Desktop\hi.txt");#elsestring content = Console.In.ReadToEnd();#endifif (string.IsNullOrEmpty(chs)) array = new string[] { content };else array = content.Split(chs.ToCharArray(), StringSplitOptions.RemoveEmptyEntries);}public double Lf { get { if (f < array.Length) return double.Parse(array[f++]); else return 0; } }public int D { get { if (f < array.Length) return int.Parse(array[f++]); else return 0; } }public long Ld { get { if (f < array.Length) return long.Parse(array[f++]); else return 0; } }public string S { get { if (f < array.Length) return array[f++]; else return ""; } }public bool OK { get { return f < array.Length; } }internal StringBuilder b = new StringBuilder();public void Dispose() { Console.Write(b.ToString()); b.Clear(); }