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

using ll = long long;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using vi = vector<int>;
using vl = vector<ll>;
template <typename T>
using max_heap = priority_queue<T>;
template <typename T>
using min_heap = priority_queue<T, vector<T>, greater<T>>;
#define Fi first
#define Se second

ll gcd(ll x, ll y){ return y?gcd(y,x%y):x; }

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	
	int T;
	cin >> T;
	for(;T--;){
		int n; cin >> n;
		cout << 100/gcd(100,n) << "\n";
	}
	return 0;
}