#include #include #include using namespace __gnu_pbds; using namespace std; typedef long long LL; typedef unsigned long long uLL; struct custom_hash { static uint64_t splitmix64(uint64_t x) { x += 0x9e3779b97f4a7c15; x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9; x = (x ^ (x >> 27)) * 0x94d049bb133111eb; return x ^ (x >> 31); } size_t operator()(uint64_t x) const { static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count(); return splitmix64(x + FIXED_RANDOM); } }; LL z = 1; int read(){ int x, f = 1; char ch; while(ch = getchar(), ch < '0' || ch > '9') if(ch == '-') f = -1; x = ch - '0'; while(ch = getchar(), ch >= '0' && ch <= '9') x = x * 10 + ch - 48; return x * f; } int ksm(int a, int b, int p){ int s = 1; while(b){ if(b & 1) s = z * s * a % p; a = z * a * a % p; b >>= 1; } return s; } int a[] = {0, 60, 62, 65, 67, 70, 75, 80, 85, 90, 95}; int b[] = {0, 10, 17, 20, 23, 27, 30, 33, 37, 40, 43}; int tot = 11; int main(){ int i, j, n, m, T, k, t, ans; T = read(); while(T--){ n = read(); ans = 0; for(i = 0; i < 11; i++){ for(j = 0; j < 11; j++){ for(k = 0; k < 11; k++){ for(t = 0; t < 11; t++){ if(a[i] + a[j] + a[k] + a[t] <= n){ ans = max(ans, b[i] + b[j] + b[k] + b[t]); } } } } } printf("%.1lf\n", 1.0 * ans / 10); } return 0; }