#include<bits/stdc++.h>
using namespace std;
#define ll long long


int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t=1;
cin>>t;
while(t--){
ll k;
cin>>k;
ll ans=1e9;
for(ll i=1;i<=1e5;i++){
	if((i*k)%100==0 and (i*(100-k))%100==0){
		ans=min(ans,i);
		break;
	}
}
cout<<ans<<endl;

}

return 0;
}
