// created by dsh'ipad
#include <iostream>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <algorithm>
using namespace std;
typedef long long ll;
const int maxn = 2e5 + 10;
const int mod = 1e9 + 7;
int a[55];
int gcd(int a, int b) {
  if(b == 0)return a;
  return gcd(b, a % b);
}
void solve ( ) {
  int n;
  cin >> n;
  cout << 100/gcd(n, 100) << endl;
}
int main( ) {
    int t; cin >> t; while(t--)
    solve();
    return 0;
}