No tags yet

No tag edit access

The problem statement has recently been changed. View the changes.

×
108. Self-numbers 2 time limit per test: 0.5 sec.
In 1949 the Indian mathematician D.R. Kaprekar discovered a class of numbers called self-numbers. For any positive integer n, define d(n) to be n plus the sum of the digits of n. (The d stands for
Input Input contains integer numbers N, K, s
Output At first line you must output one number - the quantity of self-numbers in interval [1..N]. Second line must contain K numbers - a[s
Sample Input 100 10 1 2 3 4 5 6 7 11 12 13
Sample Output 13 1 3 5 7 9 20 31 75 86 97 |

Codeforces (c) Copyright 2010-2020 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Oct/01/2020 05:25:27 (i2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|