2013年2月25日
摘要:
Problem EAll in AllInput:standard inputOutput:standard outputTime Limit:2 secondsMemory Limit:32 MBYou have devised a new encryption technique which encodes a message by inserting between its characters randomly generated strings in a clever way. Because of pending patent issues we will not discuss 阅读全文
摘要:
Skew BinaryWhen a number is expressed in decimal, thek-th digit represents a multiple of 10k. (Digits are numbered from right to left, where the least significant digit is number 0.) For example,When a number is expressed in binary, thek-th digit represents a multiple of 2k. For example,Inskew binar 阅读全文
摘要:
The Collatz SequenceAn algorithm given by Lothar Collatz produces sequences of integers, and is described as follows:Step 1:Choose an arbitrary positive integerAas the first item in the sequence.Step 2:IfA= 1 then stop.Step 3:IfAis even, then replaceAbyA/ 2 and go to step 2.Step 4:IfAis odd, then re 阅读全文
摘要:
Reverse and AddThe ProblemThe "reverse and add" method is simple: choose a number, reverse its digits and add it to the original. If the sum is not a palindrome (which means, it is not the same number from left to right and right to left), repeat this procedure.For example: 195 Initial num 阅读全文