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

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

I've tested one of my submission 95709609 which works fine with the test cases where modulo operation is not mandatory/ not becomes overflow. But in case large string , overflow occurs. May be I don't know modulo operation well. I'm trying to learn it. But if u make my code fixed by making the modulo operation then I will be glad & learn from u too. Before downvoting , please leave at least a comment.

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

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

Try taking mod for every addition and multiplication, on both operands and then on the answer, also add mod value when subtracting(then mod again) to ensure only positive values.