随机不重复
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace net
{
class Hello
{
//模拟随机发牌
static void Main()
{
HashSet<int> hs = new HashSet<int>();
Random rd = new Random();
for (int i = 0; i < 54;i++ )
{
hs.Add(rd.Next(54));
}
foreach (var item in hs)
{
Console.WriteLine(item);
}
}
}
}