Skip to content

Commit a66db80

Browse files
committed
Solve Reading Books in python
1 parent 70a3b83 commit a66db80

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

solutions/beecrowd/1542/1542.py

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import math
2+
import sys
3+
4+
for line in sys.stdin:
5+
if line.strip() == '0':
6+
break
7+
8+
q, d, p = map(int, line.split())
9+
total_pages = math.trunc(((d * p) / (p - q)) * q)
10+
11+
print(f'{total_pages} pagina', end='')
12+
print('s' if total_pages > 1 else '')

0 commit comments

Comments
 (0)