Предмет: Информатика, автор: Аноним

Срочнооо
Петя проводит эксперимент. Он последовательно приписывает одно к Другому целые числа. Начал он с единицы. Вот так: 1, 12, 123, 1234. Ha десятом шаге он приписал к предыдущему числу 10 и получил 12345678910. В итоговом числе должно быть не больше и цифр. Дано число n. Выведи самое большое число, которое мог придумать Петя.
Ввод
3
24
Вывод
123
12345678910111213141516​

Ответы

Автор ответа: anonymous2010
1

замечание к задачке

>>> len("12345678910111213141516")

23 #провал

решение:

numeber = int(input())

result = ''

for i in range(numeber):

   result += str(i+1)

newResult = ''

for i in list(result):

   newResult += i

   if len(newResult) == numeber:

       break

print(newResult)


anonymous2010: ща последняя попитка
anonymous2010: обновил
anonymous2010: я не бог, я чортов неудачник ^_^
Похожие вопросы
Предмет: Английский язык, автор: Alagad
Задать 6 вопросов по тексту. Помогите пожалуйста

Some people would prefer to work at an enjoyable job for less money; others would choose the job that offers more money even if they do not like it. A high salary often plays a key role in career decisions. However, should your career choice be based solely on future earnings?
Personally, I think that money is not the most important thing. Firstly, those who work only for the money may never find true fulfilment in the jobs that they do. Secondly, people who work in uncomfortable or dangerous conditions, lack benefits or have no opportunities for promotion will hardly be satisfied with their jobs no matter how much they are paid.

Thirdly, if your work is well-paid but repetitive and tedious, you are likely to resign sooner or later.

Nevertheless, a lot of people say that the main factor in their jobs is the money that they are paid to do them. Many employees have families to support and need enough money to maintain a lifestyle they want. Besides, if they receive a high salary, they feel that other people value their competence and professionalism.

Anyway, I believe that a low salary does not mean that a person who receives it is unqualified. Besides, sometimes even a high salary cannot satisfy a person’s individual needs.

To conclude, the job that you will choose is going to affect your physical, mental and emotional well-being. When you look for a job, you should think of a career that will be intellectually rewarding and personally fulfilling. I think that people who are satisfied with their jobs are happier and have better health.