#include <bits/stdc++.h>
#define rep(i, a, b) for(int i = a; i < b; i ++)
using namespace std;
#define endl '\n'
const int mx = 100005;
typedef long long LL;
typedef pair<int, int> pii;

int k;

int main() {

#ifndef ONLINE_JUDGE
	freopen("in.txt", "r", stdin);
//	freopen("out.txt", "w", stdout);
#endif

	ios::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);
	
	int tc; cin >>tc;
	while(tc --){
		cin >> k;
		int res = 100, tmp;
		for(int x = 1; x <= 100; x ++){
			tmp = (100 - k) * x;
			if(tmp % k) continue;
			res = min(res, x + tmp / k);
		}
		cout << res << endl;
	}
	
	

}

