ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Турниры > Epoka Science Olympiad 2013-2015 > задача:


2015-11Gr-30. 50306 - Beautiful Numbers

Epoka Science Olympiad 2013-2015

Старт: 18.мая.2013 в 10:00:00
Финиш: 18.мая.2013 в 15:00:00
Турнир завершён!
• Турнирная таблица

Гость
• Вопросы к жюри (1)

Задачи турнира

• 2015-09Gr-10. 50344 - Profit or Loss
• 2015-09Gr-20. 50725 - Fibonacci Se...
• 2015-09Gr-30. 50302 - Paper Sciss...
• 2015-09Gr-40. 50303 - Pattern
• 2015-10Gr-10. 50308 - IT Knowledg...
• 2015-10Gr-40. 50322 - Snake Pattern
• 2015-11Gr-10. 50304 - Number Pattern
• 2015-11Gr-20. 50305 - John's Tasks
• 2015-11Gr-30. 50306 - Beautiful...
• 2015-11Gr-40. 50307 - Palindromes
• 6-P2. 50882 - Say Hello

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Prepared by Geri Gokaj.

Beautiful Numbers

John really likes the numbers 3 and 7. So Maria made him a gift for his birthday. She gave him an integer N which is made up of only 3’s and or 7’s.
John was really touched by this beautiful gift and wanted to know how much Maria kept searching for this number. You will be given a number N (a beautiful number) and than you will find the how many’th beautiful number it is. A beautiful number is considered a number to have either 3 or 7 or both in it.

Input specification
An integer number N(beautiful number) where N is smaller than 4x108

Output specification
An integer that represents the order of the beautiful number.

Sample Input I
3
Sample Input II
7
Sample Input III
373
Sample Output I
1
Sample Output II
2
Sample Output III
9


Output Explanation:
Number 373 is the 9th beautiful number in ascending order
Previous beautiful numbers are 3,7,33,37,73,77,333,337

Для отправки решений необходимо выполнить вход.

www.contester.ru