mirror of
https://github.com/tiennm99/codeforces.git
synced 2026-10-14 12:16:43 +00:00
[Init] Solved solutions
This commit is contained in:
1 parent
51f667ac81
commit
20542601dd
131 files changed
+4148
No files matched your search
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
|
||||
namespace problem_1A
|
||||
{
|
||||
class problem_1A
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
string s = Console.ReadLine();
|
||||
string[] input = s.Split(' ');
|
||||
long m = Convert.ToInt32(input[0]);
|
||||
long n = Convert.ToInt32(input[1]);
|
||||
long a = Convert.ToInt32(input[2]);
|
||||
if (a != 0)
|
||||
{
|
||||
if (m % a == 0)
|
||||
{
|
||||
m /= a;
|
||||
}
|
||||
else
|
||||
{
|
||||
m = m / a + 1;
|
||||
}
|
||||
if (n % a == 0)
|
||||
{
|
||||
n /= a;
|
||||
}
|
||||
else
|
||||
{
|
||||
n = n / a + 1;
|
||||
}
|
||||
}
|
||||
Console.WriteLine(m * n);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user