using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
class Program
{
static void Main(string[] args)
{
p1083 p = new p1083();
}
}
class RTIO
{
static string bufferStr = "";
public static int GetInt()
{
if (bufferStr.Length == 0)
{
bufferStr = Console.ReadLine();
}
int index = bufferStr.IndexOf(' ');
if (index < 0) index = bufferStr.Length;
int res = int.Parse(bufferStr.Substring(0, index));
if (index != bufferStr.Length)
{
bufferStr = bufferStr.Remove(0, index + 1);
}
return res;
}
public static string GetString()
{
if (bufferStr.Length == 0)
{
bufferStr = Console.ReadLine();
}
string res = bufferStr;
bufferStr = "";
return res;
}
}
class p1083
{
public p1083()
{
int n = RTIO.GetInt();
int k = RTIO.GetString().Length;
int res = 1;
for (int i = n; i >= 1; i -= k)
{
res *= i;
}
Console.WriteLine(res);
}
}
Sunday, August 10, 2008
ural1083
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment