Блог пользователя Lgk2

Автор Lgk2, история, 4 года назад, По-английски

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()
  • Проголосовать: нравится
  • +4
  • Проголосовать: не нравится

»
4 года назад, # |
  Проголосовать: нравится +18 Проголосовать: не нравится

I use something like this for C++

int a,b,c;

while(cin >> a >> b >> c)
    {
        cout << a << b << c;
        // work
    }
»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится