#include<bits/stdc++.h>
using namespace std;
#define int long long
const int inf=0x3f3f3f3f;
const int maxn=1e5+10;
const int mod=998244353;
int gcd(int a,int b){
    return b==0?a:gcd(b,a%b);
}
signed main(){
    #ifdef debug
        freopen("in.txt","r",stdin);
        freopen("myout.txt","w",stdout);
    #else
        ios::sync_with_stdio(false);
        cin.tie(0);
        cout.tie(0);
    #endif
    int t;
    cin>>t;
    while (t--)
    {
        int n;
        cin>>n;
        int tmp=gcd(n,100);
        cout<<100/tmp<<endl;
    }
}