本文整理汇总了C#中System.Paint.CountFor方法的典型用法代码示例。如果您正苦于以下问题:C# Paint.CountFor方法的具体用法?C# Paint.CountFor怎么用?C# Paint.CountFor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Paint
的用法示例。
在下文中一共展示了Paint.CountFor方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
static void Main(string[] args)
{
string inputname = args[0];
string outputname = args[1];
string[] lines = File.ReadAllLines(inputname);
int ncases = int.Parse(lines[0]);
int nline = 0;
IList<string> results = new List<string>();
Paint paint = new Paint();
for (int k = 0; k < ncases; k++)
{
System.Console.WriteLine(string.Format("Solving Case #{0}", k + 1));
nline++;
string[] numbers = lines[nline].Split(' ');
long radius = long.Parse(numbers[0]);
long pnt = long.Parse(numbers[1]);
long result = paint.CountFor(radius, pnt);
results.Add(string.Format("Case #{0}: {1}", k + 1, result));
}
File.WriteAllLines(outputname, results.ToArray());
}
示例2: CountForRadiusThreePaintForty
public void CountForRadiusThreePaintForty()
{
Paint paint = new Paint();
Assert.AreEqual(3, paint.CountFor(3, 40));
}
示例3: CountForRadiusOnePaintTen
public void CountForRadiusOnePaintTen()
{
Paint paint = new Paint();
Assert.AreEqual(2, paint.CountFor(1, 10));
}
示例4: CountForRadiusOnePaintNine
public void CountForRadiusOnePaintNine()
{
Paint paint = new Paint();
Assert.AreEqual(1, paint.CountFor(1, 9));
}
示例5: CountForRadiusOnePaint1000000000000000000
public void CountForRadiusOnePaint1000000000000000000()
{
Paint paint = new Paint();
Assert.AreEqual(707106780, paint.CountFor(1, 1000000000000000000));
}
示例6: CountForRadius10000000000000000Paint1000000000000000000
public void CountForRadius10000000000000000Paint1000000000000000000()
{
Paint paint = new Paint();
Assert.AreEqual(49, paint.CountFor(10000000000000000, 1000000000000000000));
}