#include using namespace std; string sum(string a,string b) { int carry = 0, n; string t; int aidx, bidx; aidx = a.size() - 1; bidx = b.size() - 1; while (1) { if (aidx < 0 && bidx < 0) { break; } else if (aidx >= 0 && bidx >= 0) { n = (a[aidx] - '0') + (b[bidx] - '0'); n += carry; if (n >= 10) { n -= 10; carry = 1; } else { carry = 0; } t = char(n + '0') + t; aidx--; bidx--; } else if (aidx >= 0 && bidx < 0) { n = a[aidx] - '0'; n += carry; if (n >= 10) { n -= 10; carry = 1; } else { carry = 0; } t = char(n + '0') + t; aidx--; } else if (aidx < 0 && bidx >= 0) { n = b[bidx] - '0'; n += carry; if (n >= 10) { n -= 10; carry = 1; } else { carry = 0; } t = char(n + '0') + t; bidx--; } } if (carry == 1) { t = '1' + t; } return t; } int main(void) { cin.tie(0); ios::sync_with_stdio(false); int N; string A = "0"; string B = "1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991"; cin >> N; for(int i=0;i81) x = 2; for(int i=0;i