#include <bits/stdc++.h>
#define ll long long
#define str string
#define pb push_back
#define tvvod int t;cin>>t;while(t--)
#define optimizator ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
using namespace std;
int main(){
	// freopen (" .txt", "r", stdin);
	// freopen (" .txt", "w", stdout);
	optimizator;
	tvvod{
		int n;
		cin>>n;
		double a=100/n;
		if(a*n==100){
			cout<<a<<endl;
			continue;
		}
		else{
			for(double i=1; i<=100; i++){
				int h=0;
				for(double j=1; j<=i; j++){
					if((j*100)/i==n){
						cout<<i<<endl;
						h=1;
						break;
					}
				}
				if(h==1){
					break;
				}
			}
		}
	}
}