#include <iostream>
using namespace std;

int gcd(int a,int b)    {
    if(b>a) return gcd(b,a);
    if(b==0)    return a;
    return gcd(a%b,b);
}

int main() {
    int t;
    cin>>t;
    while(t--)  {
        int n;
        cin>>n;
        cout<<100/gcd(n,100-n)<<'\n';
    }
}
