#include<bits/stdc++.h>usingnamespace std;#define mod 1000000007#define INF 0x3f3f3f3f#define pi 3.141592654typedeflonglong ll;constint N =2e6+5;struct node{int a,d;int ti;}w[1005];intcmp(node x,node y){return x.ti <y.ti;}intmain(){int t,n,x,y;scanf("%d",&t);while(t--){scanf("%d",&n);for(int i =1; i <= n ; i++){scanf("%d %d",&w[i].a,&w[i].d);if(w[i].a ==100)
w[i].ti =0;else{
w[i].ti =(100+w[i].a-1)/w[i].a;
w[i].ti =(w[i].ti -1)* w[i].d;}}sort(w+1,w+1+n,cmp);int now = w[1].ti;double p =0,s =1.0/n;for(int i =1; i <= n ; i++){if(w[i].ti == now) p +=0.5* s;else p += s;}printf("%.6f\n",p);}return0;}
#include<bits/stdc++.h>usingnamespace std;#define pb push_back#define mp make_pair#define fi first#define se secondtypedeflonglong ll;typedefunsignedlonglong ull;typedef pair<int,int> PII;typedef pair<ll, ll> pll;constint mod =1e9+7;constint N =2e5+10;constint INF =0x3f3f3f3f;constdouble g =6.67430e-11;
ll qpow(ll base, ll n){ll ans =1;while(n){if(n &1) ans = ans * base % mod; base = base * base % mod; n >>=1;}return ans;}
ll gcd(ll a, ll b){return b ?gcd(b, a % b): a;}intmain(){int cas;
cin >> cas;while(cas --){double a, b, d, t;scanf("%lf %lf %lf %lf",&a,&b,&d,&t);double x = g * b /(d * d);double y = g * a /(d * d);double sa =0.5* x * t * t;double sb =0.5* y * t * t;//printf("%.20f\n", sa + sb);double ans = d -(sa + sb)*0.001;printf("%.30f\n", ans);}return0;}
1002 贪心#include<bits/stdc++.h>using namespace std;#define mod 1000000007#define INF 0x3f3f3f3f#define pi 3.141592654typedef long long ll;const int N = 2e6+5;struct node{ int a,d; int ti;}w[1005];int cmp(node x,node y){ return x.