#include <bits/stdc++.h> //简单快捷包括所有头文件,推荐使用 using namespace std; int n; int x[200010],y[200010],s[200010]; bool f(double w){ long double sum = 0; for(int i = 0; i < n; i++){ sum += s[i]/w; if(sum > y[i])return false; if(sum < x[i])sum = x[i]; } return true; } int main() { scanf("%d",&n); for(int i = 0; i < n; i++){ scanf("%d%d%d",&x[i],&y[i],&s[i]); } long double l = 0,ans = 0,r = 1e9; while(r-l>0.00001){ double mid = (l+r)/2; if(f(mid))ans = mid,r = mid; else l = mid; } printf("%0.2Lf ",ans); return 0; }