#include<bits/stdc++.h>
using namespace std;
#define ll long long
const int M=1e5+1;
inline int gcd(int a,int b){
	if(b==0) return a;
	return gcd(b,a%b); 
} 
int main()
{
	int t;
	cin>>t;
	while(t--){
		int a;
		cin>>a;
		cout<<100/gcd(100,a)<<endl;
		
		
	}
}