本文整理匯總了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));
}