You are not logged in. Please login at to post your questions!


Help needed for C.Lucky Days from cup round 2

Yesterday I took part in cup round 2 and came across this problem. This is a maths problem and has tags math and number theory but from the editorial I couldn't understand how to approach this problem.....

In the comments section it was written that the question can be solved using Bezout's identity...

"All possible shifts of Alice's and Bobs' pattern periods are the multiples of gcd(ta,tb)."

Question Link

Editorial Link

asked 11 Nov '18, 10:29

amstan's gravatar image

accept rate: 0%

toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 11 Nov '18, 10:29

question was seen: 158 times

last updated: 11 Nov '18, 10:29