#include <bits/stdc++.h>
#define F first
#define S second
#define mp make_pair
#define pb push_back
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pi;
const ll inf = 1e18+5;
ll t;
vector<ll> divisors;
//ll pos[] = {2, 3, 5, 7}
ll gcd(ll a, ll b){
	if (b == 0)return a;
	return gcd(b, a%b);
}
int main(){
	ios_base::sync_with_stdio(0);cin.tie(0);
	cin >> t;
	for (ll i = 0; i <t; i++){
		ll a;cin >> a;
		float f; f = 100.0/(float)a;
		ll b = 100-a;
		ll div = gcd(a, 100);
		//cout << (div != 0) ? (100/div): 100 << '\n';
		if (div != 0)cout << 100/div << '\n';
		else cout << 100 << '\n';
	}
	
}
