#include using namespace std; typedef long long ll; typedef pair pii; #define sz(a) ((int)a.size()) #define pb push_back #define lson (rt << 1) #define rson (rt << 1 | 1) #define gmid (l + r >> 1) const int maxn = 2e5 + 5; const int inf = 0x3f3f3f3f; const int mod = 1e9 + 7; inline double getGPA(int x){ if(x < 0 || x > 100) return -1e5; else if(x >= 95) return 4.3; else if(x >= 90) return 4.0; else if(x >= 85) return 3.7; else if(x >= 80) return 3.3; else if(x >= 75) return 3.0; else if(x >= 70) return 2.7; else if(x >= 67) return 2.3; else if(x >= 65) return 2.0; else if(x >= 62) return 1.7; else if(x >= 60) return 1.0; else return 0; } double ans[maxn]; int main(){ ios::sync_with_stdio(0); cin.tie(0); for(int i = 0; i <= 100; ++i){ for(int j = i; j <= 100; ++j){ for(int k = j; k <= 100; ++k){ for(int o = k; o <= 100; ++o){ int sum = i + j + k + o; ans[sum] = max(ans[sum], getGPA(i) + getGPA(j) + getGPA(k) + getGPA(o)); } } } } cout << fixed << setprecision(1); int t; cin >> t; while(t--){ int n; cin >> n; cout << ans[n] << "\n"; } return 0; }