#include<bits/stdc++.h>
using namespace std;
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 e;cin>>e;
        int w= 100-e;
        
        int num= gcd(w,e);
        if(num>1)
        cout<< (w/num + e/num)<< endl;
        else
        cout<<100<<endl;
    }
}