#include <iostream>

using namespace std;  

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

int main()
{
	//init_code();

	int i,t,k,gcd;
	cin>>t;
	while(t--)
	{
		gcd=100;
		cin>>k;
		for(i=1;i<=k && i<=(100-k);i++)
		{
			if(k%i==0 && (100-k)%i==0)
				gcd=i;
		}
		cout<<(k/gcd)+((100-k)/gcd)<<"\n";
	}
	

	return 0;
}
