- #include<bits/stdc++.h>
- using namespace std;
- int main() {
- int n, i, cnt = 0;
- cin>>n;
- for(i = 0; ; i++){
- int temp = i;
- int sum = 0;
- while(temp){
- int rem = temp % 10;
- temp /= 10;
- sum += rem;
- }
- if(sum == 10){
- cnt++;
- if(cnt >= n)
- break;
- }
- }
- cout<<i<<endl;
- return 0;
- }
No comments