How do i know when to stop reading inputs

Правка en1, от Lgk2, 2020-09-21 06:35:06

https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3347

I'm trying to solve this problem in python but i'm not sure when to stop reading inputs. All inputs come in multiples of 3 but i don't know when to break my loop.

while True:
    print(pow(int(input()), int(input()), int(input())))
    input()

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Lgk2 2020-09-21 06:35:06 420 Initial revision (published)