/* * @Author: hesorchen * @Date: 2020-07-03 17:05:01 * @LastEditTime: 2020-07-19 14:14:51 * @Description: https://hesorchen.github.io/ */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define endl '\n' #define PI acos(-1) #define PB push_back #define ll long long #define INF 0x3f3f3f3f #define mod 1000000007 #define pll pair #define lowbit(abcd) (abcd & (-abcd)) #define max(a, b) ((a > b) ? (a) : (b)) #define min(a, b) ((a < b) ? (a) : (b)) #define IOS \ ios::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0); #define FRE \ { \ freopen("in.txt", "r", stdin); \ freopen("out.txt", "w", stdout); \ } inline ll read() { ll x = 0, f = 1; char ch = getchar(); while (ch < '0' || ch > '9') { if (ch == '-') f = -1; ch = getchar(); } while (ch >= '0' && ch <= '9') { x = (x << 1) + (x << 3) + (ch ^ 48); ch = getchar(); } return x * f; } //head============================================================================== double get(ll s) { if (s >= 95) return 4.3; if (s >= 90) return 4; if (s >= 85) return 3.7; if (s >= 80) return 3.3; if (s >= 75) return 3.0; if (s >= 70) return 2.7; if (s >= 67) return 2.3; if (s >= 65) return 2.0; if (s >= 62) return 1.7; if (s >= 60) return 1.0; return 0; } // map mp; int mp[1000]; int main() { fill(mp, mp + 1000, 1); mp[0] = 60; mp[60] = 2; mp[62] = 3; mp[65] = 2; mp[67] = 3; mp[70] = 5; mp[75] = 5; mp[80] = 5; mp[85] = 5; mp[90] = 5; ll t; cin >> t; while (t--) { double ans = 0; ll n; cin >> n; for (int i = 0; i <= 100; i += mp[i]) for (int j = 0; j <= 100; j += mp[j]) for (int k = 0; k <= 100; k += mp[k]) { ll l = n - i - j - k; if (l <= 100 && l >= 0) ans = max(get(i) + get(j) + get(l) + get(k), ans); } // cout << ans << endl; printf("%.1lf\n", ans); } return 0; }