|
|
вернуться в форумПоказать все сообщения Спрятать все сообщения0.031 time #include <iostream> #include <cmath> #define ll long long using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); ll N; cin >> N; while (N--) { ll a; cin >> a; ll r = a - 1; ll k = sqrt(2 * r); if (k * (k + 1) / 2 == r) { cout << 1; } else { cout << 0; } cout << " "; } cout << endl; return 0; } a = int(input()) s = str() i = 0 r = [] w = [] while i != 200: s = s + str(10**i) i = i+1 for i in range(a): q = int(input()) r = s[0:q+1] print(r[-2:-1]) |
|
|