B"This is an unusual problem in an unusual contest, here is the announcement: http://codeforces.com/blog/entry/73543 You have the safe lock which consists of 100 decimal digits. If you rotate some digit, it increases by one, except 9 which becomes 0. Initially, the lock contains number x . To unlock the safe you must do the following operations in order (and be careful, don't mix up if and else statements). If digit 39 is odd, rotate digit 39 by 9 times, else rotate digit 37 by 1 times. If digit 24 is odd, rotate digit 24 by 1 times, else rotate digit 76 by 3 times. If sum of digits 13 and 91 is greater than 10, rotate digit 14 by 6 times, else rotate digit 34 by 8 times. If digit 87 is odd, rotate digit 87 by 7 times, else rotate digit 22 by 9 times. If digit 79 is greater than digit 15, rotate digit 74 by 7 times, else rotate digit 84 by 6 times. If sum of digits 26 and 66 is greater than 9, rotate digit 31 by 7 times, else rotate digit 95 by 4 times. If sum of digits 53 and 1 is greater than 8, rotate digit 66 by 1 times, else rotate digit 94 by 6 times. If digit 41 is greater than digit 29, rotate digit 67 by 5 times, else rotate digit 41 by 9 times. If sum of digits 79 and 20 is greater than 10, rotate digit 18 by 2 times, else rotate digit 72 by 9 times. If sum of digits 14 and 24 is greater than 10, rotate digit 64 by 2 times, else rotate digit 84 by 2 times. If digit 16 is greater than digit 34, rotate digit 81 by 5 times, else rotate digit 15 by 2 times. If sum of digits 48 and 65 is greater than 9, rotate digit 57 by 2 times, else rotate digit 28 by 5 times. If digit 81 is odd, rotate digit 81 by 5 times, else rotate digit 25 by 4 times. If digit 70 is odd, rotate digit 70 by 9 times, else rotate digit 93 by 3 times. If sum of digits 92 and 49 is greater than 9, rotate digit 81 by 2 times, else rotate digit 42 by 3 times. If digit 96 is greater than digit 20, rotate digit 45 by 4 times, else rotate digit 45 by 1 times. If digit 91 is greater t"... |