Skip to content

Commit

Permalink
Solve Reading Books in python
Browse files Browse the repository at this point in the history
  • Loading branch information
deniscostadsc committed Nov 20, 2024
1 parent 70a3b83 commit a66db80
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions solutions/beecrowd/1542/1542.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import math
import sys

for line in sys.stdin:
if line.strip() == '0':
break

q, d, p = map(int, line.split())
total_pages = math.trunc(((d * p) / (p - q)) * q)

print(f'{total_pages} pagina', end='')
print('s' if total_pages > 1 else '')

0 comments on commit a66db80

Please sign in to comment.