← Back to topics
Topic

Handsome Numbers

t
thocevar
Thanks to the author for such a nice task. :)

However, I just can't get it accepted. Best I can do is get AC on 5th and 20th test, WA on the rest.
Does anyone have some tricky case, cause I've just ran out of them.
b
boba5551
Thanks :)

19th test case is
1 1 0 1000000000000000000
1
1

solution is 0
t
thocevar
hm, that helped to get 19th AC. :)

It was something else that I was doing wrong. I really don't know how I managed to avoid the case where numbers are not coprime and one is not a divisors of some other.

Here's a case for anyone else dealing with WA on this task:
2 2 100 10000
6
9
2
171
solution: 2171
u
ufvpaulo
In fact, nice problem...