10211 - Divisibility Testing! Wow!
Moderator: Board moderators
10211 - Divisibility Testing! Wow!
I have tired this problem but got wrong answer...
Could anyone tell me what's the base of the second input of each input set?
e.g. if the input is 16 20
then it means the base is 16
but the 20 means a decimal 20 or 20 of base 16?
Thx in advance =)
Could anyone tell me what's the base of the second input of each input set?
e.g. if the input is 16 20
then it means the base is 16
but the 20 means a decimal 20 or 20 of base 16?
Thx in advance =)
-
- Guru
- Posts: 724
- Joined: Wed Dec 19, 2001 2:00 am
- Location: Germany
10211 - "Divisibility Testing! Wow!!"
Could someone confirm or refute these outputs?
Input:
Output:
Input:
Code: Select all
439 2918
27 12
3 13
3141 592
10 6
Code: Select all
Add all 1458
Alternate 729 change sign
condition not found.
Add all 3
Add all 36
condition not found.
-
- Experienced poster
- Posts: 128
- Joined: Fri Nov 15, 2002 7:45 am
- Location: Kyrgyzstan
Hello!
My AC program produced this:
According to the problem statement Add all 1458 is illegal.
Have AC!
Andrey.
My AC program produced this:
Code: Select all
Alternate 729 change sign
condition not found.
Add all 3
Add all 36
condition not found.
Have AC!
![:D](./images/smilies/icon_biggrin.gif)
Andrey.
-
- Experienced poster
- Posts: 122
- Joined: Sun Nov 13, 2005 10:25 am
- Location: Taiwan
Hello, what are the outputs of
Thanks
Code: Select all
10 6
5 2
My AC code outputs:
----
Rio
Code: Select all
condition not found.
Add all 1
Alternate 1 change sign
Rio
-
- Experienced poster
- Posts: 122
- Joined: Sun Nov 13, 2005 10:25 am
- Location: Taiwan
Code: Select all
5 2
Code: Select all
Add all 1
Alternate 1 change sign
Code: Select all
Add all 1
Because:
----
RIo
Code: Select all
Sum of all digits is even(odd) <--> Sum of all digits with alternative signs is even(odd)
RIo
-
- Experienced poster
- Posts: 122
- Joined: Sun Nov 13, 2005 10:25 am
- Location: Taiwan
-
- New poster
- Posts: 37
- Joined: Wed Mar 14, 2012 11:57 am
- Location: Bangladesh
- Contact:
Re: 10211 - Divisibility Testing! Wow!!
Really interesting problem. I knew about the divisibility rules before, but to solve the problem, I had to finally understand the proofs formally.