Smallest 13-5-number X21587


Statement
 

pdf   zip

html

Write a program that provided a sequence of numbers prints the smallest one that is multiple of 13 and has digit 5 —digit 5 appears at least once in the (base 10) representation of the number —.

Input

The input has one or more cases. Each case consists of a sequence of naturals (integers greater than zero) finished with number zero.

Output

For each case, the program has to print in a line the smallest number in the sequence that is a multiple of 13 and has the digit 5. If there is no such a number, the program has to write no one.

Public test cases
  • Input

    25 13 65 5 52 0
    13 26 78 1 0
    13 26 65 0
    0
    520 0
    
    

    Output

    52
    no one
    65
    no one
    520
    
  • Information
    Author
    ProAl
    Language
    English
    Official solutions
    Python
    User solutions
    Python