Lang:G++
Edit12345678910111213141516171819202122232425262728293031#include <iostream>#include <string>using namespace std;int main() {ios::sync_with_stdio(false); cin.tie(0);int n;cin >> n;for(;n--;) {string x;cin >> x;int y = x.length();for(int j = y-1; j >= 0; j--) {if(x[j]!='0') break;y--;}for(int j = 2; j < y; j++) x[j] -= '0';string z = "";for(int j = 2; j < y; j++) {for(int i = 2; i < y; i++) {x[i] *= 2;}for(int i = y-1; i > 2; i--) {x[i-1] += x[i] / 10;x[i] %= 10;}if(x[2] >= 10) {z += '1';x[2] -= 10;} else {