#include #include #include #include #include #include #include using namespace std; #define int long long #define rep(i,n) for(int i = 0; i < (n); i++) #define INF (long long)(1e18) #define MOD (int)(1e9+7) #define yn(f) ((f)?"Yes":"No") #define YN(f) ((f)?"YES":"NO") void hoge(int n, int B){ int re = 0, tn = n; stack ans; B *= -1; for(int b = B; ; b*=B){//cout<>T>>B; for(int i = 0; i < T; i++){ cin>>N; // cout<