/// <summary> /// 获得羊 /// </summary> /// <param name="day">月数</param> /// <param name="initialSheepNum">初始有多少只羊</param> /// <returns></returns> public ulong Sheep(int day, ulong initialSheepNum = 1) { ulong all = initialSheepNum; ulong a = 0; ulong b = 0; ulong c = 0; for (int i = 0; i < day; i++) { // Console.WriteLine(all); all += c; c = b; b = a; a = all; } return all; }