Untitled
unknown
plain_text
21 days ago
582 B
3
Indexable
Never
#include <bits/stdc++.h> #define endl '\n' #define maxn 105 #define TASK bai1 #define For(i,a,b) for ( int i = a; i <= b; i++ ) #define Ford(i,a,b) for ( int i = a; i >= b; i-- ) #define MOD 100000000000007 using namespace std; string s =""; int n; void inp() { cin >> n; } void solve() { For(i,1,n) if(s.find(to_string(i)) > s.size()) s += to_string(i); cout << s; } int main() { ios_base:: sync_with_stdio(0); cin.tie(0); if(fopen("bai1.inp","r")){ freopen("bai1.inp","r",stdin); } inp(); solve(); }
Leave a Comment