#include<bits/stdc++.h>
using namespace std;
long long gcd(long long int a, long long int b)
{
  if (b == 0)
    return a;
  return gcd(b, a % b);
}
 
// Function to return LCM of two numbers
long long lcm(long long int a,long long  int b)
{
    return (a / gcd(a, b)) * b;
}
int main()
{
	int t,i;
	cin>>t;
	for(i=0;i<t;i++)
	{
	     long long int k,p,u;
	     cin>>k;
	     p=100-k;
	     u=gcd(k,p);
	     //cout<<"hello";
	    // cout<<u<<endl;
	     cout<<k/u+p/u<<endl;

	     
	}
}