#include <bits/stdc++.h>
using namespace std;
 
#define int long long
#define mod 1000000007
#define double long double

//__gcd(6, 20)
//*max_element(arr, arr+n);
bool prime[100000000];
void SieveOfEratosthenes(int n)
{
    memset(prime, true, sizeof(prime));
 
    for (int p = 2; p * p <= n; p++)
    {
        if (prime[p] == true) 
        {
            for (int i = p * p; i <= n; i += p)
                prime[i] = false;
        }
    }
}
/*int gcd(int a, int b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b); 
     
}*/
/*for (int i=1; i<=sqrt(n); i++) 
{ 
    if (n%i == 0) 
    { 
        // If divisors are equal, print only one 
        if (n/i == i) 
            printf("%d ", i); 

        else // Otherwise print both 
            printf("%d %d ", i, n/i); 
    } 
} */
//vector<int> adj[100000];  /
//vector<bool> used(100000);
//vector<int> d(100000), p(10000);
/*void bfs(int s){
queue<int> q;
q.push(s);
used[s] = true;
while (!q.empty()) {
    int v = q.front();
    q.pop();
    for (int u : adj[v]) {
        if (!used[u]) {
            used[u] = true;
            q.push(u);
            d[u] = d[v] + 1;
        }
    }
}
}*/
//unordered_map<int,int> umap;
signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    int t;
    cin>>t;
    while(t--){
        int a,b,c,n,m,p,d,i;
        cin>>a;
        if(a==100)
        {
            cout<<"1\n";
            continue;
        }
        b=100/100-a;
        for(i=1;i<=100;i++)
        {
            b=(i*100)%(100-a);
            if(b==0)
            break;
        }
        cout<<(i*100)/(100-a)<<"\n";
    }
    return 0;
}