回覆列表
  • 1 # 木子李ovo

    using System;

    using System.Collections.Generic;

    using System.Linq;

    namespace test

    {

    class Program

    {

    static void Main(string[] args)

    {

    List<int> result = new List<int>();

    for (int i = 1; i <= 1000; i++)

    if (i % 11 == 0)

    if (i.ToString().Sum(a => int.Parse(a.ToString())) == 13)

    result.Add(i);

    for (int i = 0; i * 5 < result.Count(); i++)

    Console.WriteLine(string.Join("\t", result.Skip(i * 5).Take(5)));

    Console.WriteLine("共{0}個數字滿足要求", result.Count());

    Console.WriteLine("按任意鍵結束");

    Console.ReadKey();

    }

    }

    }

  • 中秋節和大豐收的關聯?
  • 燈芯絨和條絨有什麼區別?