#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include "bits/stdc++.h" #define REP(i,a,b) for(i=a;i>= 1; } reverse(ALL(s)); ull b = stoull(s); if (b % 3 == 0 && b % 5 == 0) { v[vsize++] = b; } if (vsize == N) goto end; } } end: cout << v[N-1] << endl; return 0; }