Please, try EDU on Codeforces! New educational section with videos, subtitles, texts, and problems. ×

Least common term of two arithmetic sequences

Revision en1, by Abhibansal53, 2015-08-21 12:08:00

Given two arithmetic sequences (a1,d1 i.e. first term and common difference of first sequence and similarly a2,d2),what is the best algorithm to tell whether they have any common term,and if yes then tell the lowest one.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Abhibansal53 2015-08-21 12:08:00 265 Initial revision (published)