#include <iostream>
#include <bits/stdc++.h>
#include <string>

using namespace std;

#define int			long long
#define	pb			push_back
#define mp			make_pair
#define endl		'\n'
#define sp(x,y)		fixed<<setprecision(y)<<x
#define setbits(x)	__builtin_popcountll(x)

void fastio() {

	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}

int gcd(int a, int b) {

	if (b == 0) {
		return a;
	}
	return gcd(b, a % b);

}

void solve() {

	int n;
	cin >> n;

	int num = 100;
	while (true) {
		int g = gcd(num, n);
		if (g == 1) {
			break;
		}
		num /= g;
		n /= g;
	}

	cout << num << '\n';
	return;
}


int32_t main() {

	fastio();

	int t;
	cin >> t;
	while (t--) {
		solve();
	}

	return 0;
}