10211 - Divisibility Testing! Wow!

All about problems in Volume 102. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
10153EN
Experienced poster
Posts: 148
Joined: Sun Jan 06, 2002 2:00 am
Location: Hong Kong
Contact:

10211 - Divisibility Testing! Wow!

Post by 10153EN » Sun Apr 07, 2002 3:32 pm

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 =)

Adrian Kuegel
Guru
Posts: 724
Joined: Wed Dec 19, 2001 2:00 am
Location: Germany

Post by Adrian Kuegel » Sun Apr 07, 2002 8:13 pm

I havn't tried this problem yet, but I am absolutely sure that the second number is a decimal number, because in the description of the problem there is no definition how to write for example 97 in base 100, therefore the problem wouldn't be solvable.

Per
A great helper
Posts: 429
Joined: Fri Nov 29, 2002 11:27 pm
Location: Sweden

10211 - "Divisibility Testing! Wow!!"

Post by Per » Fri Dec 05, 2003 2:06 am

Could someone confirm or refute these outputs?

Input:

Code: Select all

439 2918
27 12
3 13
3141 592
10 6
Output:

Code: Select all

Add all 1458
Alternate 729 change sign

condition not found.

Add all 3

Add all 36

condition not found.

Andrey Mokhov
Experienced poster
Posts: 128
Joined: Fri Nov 15, 2002 7:45 am
Location: Kyrgyzstan

Post by Andrey Mokhov » Fri Dec 05, 2003 11:20 am

Hello!

My AC program produced this:

Code: Select all

Alternate 729 change sign

condition not found.

Add all 3

Add all 36

condition not found.
According to the problem statement Add all 1458 is illegal.

Have AC! :D
Andrey.

Per
A great helper
Posts: 429
Joined: Fri Nov 29, 2002 11:27 pm
Location: Sweden

Post by Per » Fri Dec 05, 2003 11:57 am

Thanks Andrey!

I had misunderstood the output format. Also I had another mistake, in handling cases such as "7 2", but now I'm AC. Thanks!

Wei-Ming Chen
Experienced poster
Posts: 122
Joined: Sun Nov 13, 2005 10:25 am
Location: Taiwan

Post by Wei-Ming Chen » Thu Jul 12, 2007 10:43 am

Hello, what are the outputs of

Code: Select all

10 6
5 2
Thanks

User avatar
rio
A great helper
Posts: 385
Joined: Thu Sep 21, 2006 5:01 pm
Location: Kyoto, Japan

Post by rio » Thu Jul 12, 2007 3:05 pm

My AC code outputs:

Code: Select all

condition not found.

Add all 1
Alternate 1 change sign
----
Rio

Wei-Ming Chen
Experienced poster
Posts: 122
Joined: Sun Nov 13, 2005 10:25 am
Location: Taiwan

Post by Wei-Ming Chen » Thu Jul 12, 2007 4:56 pm

Code: Select all

5 2
why the answer is

Code: Select all

Add all 1 
Alternate 1 change sign
not

Code: Select all

Add all 1

User avatar
rio
A great helper
Posts: 385
Joined: Thu Sep 21, 2006 5:01 pm
Location: Kyoto, Japan

Post by rio » Thu Jul 12, 2007 5:23 pm

Because:

Code: Select all

Sum of all digits is even(odd)  <--> Sum of all digits with alternative signs is even(odd)
----
RIo

Wei-Ming Chen
Experienced poster
Posts: 122
Joined: Sun Nov 13, 2005 10:25 am
Location: Taiwan

Post by Wei-Ming Chen » Thu Jul 12, 2007 5:35 pm

Thanks rio

you help me again and again.. :D

forthright48
New poster
Posts: 37
Joined: Wed Mar 14, 2012 11:57 am
Location: Bangladesh
Contact:

Re: 10211 - Divisibility Testing! Wow!!

Post by forthright48 » Sun Jan 19, 2014 8:08 pm

Really interesting problem. I knew about the divisibility rules before, but to solve the problem, I had to finally understand the proofs formally.
What ever happens, happens for good. Even when we get WA :p
http://www.forthright48.com

Post Reply

Return to “Volume 102 (10200-10299)”