我的 #include<stdio.h> #include<iostream>
#include<string> using namespace std; int main(){ int T;
cin >> T; while(T--){ long long K; cin
>> K; string ret; K = K-1; long long temp
= 1; while(K>0){ temp = temp*2;
if(K%temp<temp/2) ret = '4'+ret; else ret = '7'+ret;
K = K-temp; } cout << ret <<endl; }
return 0; }