日期:2014-05-18 浏览次数:20807 次
int s = 0, t = 0; for (int n = 1; t < 50; n++) { s += t; t = Enumerable.Range(1, n).Sum(); } Console.WriteLine(s); Console.WriteLine(t);