Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения | idea | srevarun | 1385. Интересное число | 30 авг 2017 14:51 | 1 | idea srevarun 30 авг 2017 14:51 Guys can anyone give any idea about how to solve this dynamically . | Give me some test, пожалуйста!!! | snipious {USSR СССР SIAL СМАЛ Pimenov Пименов} | 1385. Интересное число | 18 мар 2015 00:14 | 3 | I think: if n = 1 => 14 if n = 2 => 16 (+1040, 2080) if n > 2 => 17 (+10...080...0) Is not it??? Sorry for my worse English. For example, 1144 and 2288 are interesting too. n = 1 n = 2 n = 3 n = 4 ..... ..... ..... n = 16 i think this tests will be useful for u | The difficulty of this problem is overrated | ucs6 | 1385. Интересное число | 18 мар 2015 00:12 | 3 | plz move it up to the easier places ??? Edited by author 18.03.2015 00:12 | No subject | Nigora | 1385. Интересное число | 9 дек 2011 22:12 | 1 | | Give me answer n=2,3,4 plz.... | Poleshuk_N | 1385. Интересное число | 7 авг 2011 05:09 | 5 | My answer is n=2 : 140 n=3 : 1400 n=4 : 14000 Edited by author 23.12.2005 20:41 You can find answer for n=2 yourself with bruteforce solution. And it's not 140. :) Good luck! I solve this problem: n=1 -> write(14) n=2 -> write(155) n=3 -> write(1575) n=4 -> write(15750) n=5 -> write(157500) ................. n=m -> write(157500...00) (n-3 zeros) Edited by author 24.12.2005 07:42 Edited by author 24.12.2005 07:43 Угу... счас! WA#7! Хотя моя программа выдаёт те же самые числа до n = 5 включительно, дальше считать не стал, ибо придётся загнать комп до чёрного дыма >___<" Poleshuk_N is right. Try to solve this as a mathematical problem! Here are some ideas for you. Let "m=a*10^n+b". 'a' divides 'm', hence 'a' divides "b=m-a*10^n", too. Let "b=k*a", where 'k' is a natural number (it cannot be zero as 'b' cannot be zero). Moreover, "k<10" (obvious). On the other hand, 'b' divides 'm', hence 'b' divides "a*10^n=m-b", too. This means that "(a*10^n)/b=(a*10^n)/(k*a)=(10^n)/k" is integer. Thus 'k' is a divisor of '10^n': 1,2,4,5 or 8. But don't forget two special cases: 1) if "n=1", 'k' may be one of: 1,2,5; 2) if "n=2", 'k' may be one of: 1,2,4,5. Then you can perform some simple calculations and find out the answer. Edited by author 07.08.2011 05:12 | Without leading zeroes? | Tkach Andriy | 1385. Интересное число | 26 май 2011 17:04 | 3 | What is "without leading zeroes"? this means that if the answer is 12, the you should print 12, not 0012; the latter will be judged as Wrong Answer. No, that is not what is meant. It means that an interesting number should not have leading zeros. So "0408" is not an interesting number, even though 408 is divisible by both 4 and 8. | why is 14 when n equals to 1? | Gio Pataraia [Tbilisi SU] | 1385. Интересное число | 24 апр 2011 17:15 | 3 | 4 is't divisible to 14.. can someone explain my mistake? maybe i dont understand condition. :(( 14 is just a number of numbers (xD): 11, 12, 15, 22, 24, 33, 36, 44, 48, 55, 66, 77, 88, 99. oh thanks :D becouse my bad english sometimes i understood conditions mistakely :( p.s thank you anyway :)) | Genuine Algo | jagatsastry | 1385. Интересное число | 2 окт 2009 21:46 | 5 | Can anyone suggest a genuine method of solving this problem. i.e. not a method such as if(n==1) printf("14"); else if(n==2) printf("155"); else { printf("1575"); for(i=3;i<n;i++) printf("0"); } Edited by author 24.07.2008 12:02 Edited by author 24.07.2008 12:02 I have solution ... right solution, but I have TLE #4 ... It's so slowly. Yes,this problem has genuine algo: this is just a formula. Try to get it by yourself using this hint: write general formula for interesting numbers on paper and try to find what numbers are impossible and vise-versa. If you want see my code send me mail to bauracm@mail.ru | 1385. interesting number | vgu | 1385. Интересное число | 1 окт 2005 22:58 | 4 | is the number 1001 interesting or not??? I think yes (1001 mod 1 = 0 :) Why not? Definetly NOT! 1001%10 != 0 !!!!! Sorry :) I am not very attentive :( | Misunderstand | Pimp | 1385. Интересное число | 24 сен 2005 16:29 | 1 | kto reshil etu problemu poshlite i mne please farhof.kenjaev@gmail.com |
|
|