I am new at Python. Here is my code which scans number of test cases tc as input and then two integers r and c and calculating my result.
Question: How to remove the error?
#!bin/bash/python
tc=int(input());
while tc:
r,c=raw_input().split()
if r%2==0:
r=r/2
else:
r=r/2+1
print(r*c)
tc=tc-1
4 //input tc
10 10 //input r=10 c=10
Error displayed at the screen:
Traceback (most recent call last):
File "spoj_solders.py", line 5, in <module>
if r%2==0:
TypeError: not all arguments converted during string formatting
What is this string formatting?
Platform: Ubuntu 10.04