The code works fine locally, but a runtime error in Codeforces?

I tried to make the first problem in codeforces just to be familiar with it. It gives results when I try to use it on my Ipython laptop, but it always gives a runtime error when I load it based on code. Can anyone help?

Problem :

The theater square in the capital of Berland is rectangular in size n Γ— m meters. On the occasion of the anniversary of the city, it was decided to lay an area with square granite slabs. Each tile stone is a Γ— a in size.

What is the smallest number of tiles required for laying the area? This made it possible to cover the surface more than the area of ​​the Theater, but the area should be covered. This did not allow to break the plates. The sides of the slab should be parallel to the sides of the square.

Input: The input contains three positive integers in the first line: n, m and a (1 ≀ n, m, a ≀ 109).

Conclusion: Write the required number of tiles.

Test record example:

Input - 6 6 4 , Output - 4 

My attempt:

 a = map(int,raw_input().split()) l,b,s = a[0],a[1],a[2] print(((l+s-1)/s)*((b+s-1)/s)) 

EDIT: There are not many explanations for the error, other than "Test execution 1 failed." Also, if that helps, the time used is 92 ms, and the memory used is 0 KB.

+5
source share
2 answers

I inserted your exact code in Codeforces and installed the language as "Python 2.7" and got approval.

+2
source
 n=input('enter the value of n') m=input('enter the value of m') a=input('enter the value of a') c=(n*m)/(a*a); print'no. of flags=',c 
0
source

Source: https://habr.com/ru/post/1202989/


All Articles