#include <iostream>
#include <stdio.h>
#include <cstdio>
#include <algorithm>
#include <stdlib.h>
#include <cstdlib>
#include <math.h>
#include <cmath>
#include <string>
#include <string.h>
#include <cstring>
#include <vector>
#include <queue>
#include <list>
#include <stack>

using namespace std;

int T;

void ready()
{
    ios::sync_with_stdio(false),cin.tie(0);
    cin>>T;
}

int gcd(int x,int y)
{
	if(x%y==0)
	  return y;
	return gcd(y,x%y);
}

int work()
{
	int k,b;
	cin>>k;
	b=100-k;
	if(k==100)
	  return 1;
	int gc=gcd(k,b);
	return k/gc+b/gc;
}

int main()
{
    ready();
    while(T--)
    cout<<work()<<'\n';
     return 0;
}
