/*判断n是否满足 若干个9最后一位为任意数字 如: 99997 99999 若满足则直接输出 n 否则输出 n 的位数减一个 9*/#include<iostream>#include<cstring>#include<algorithm>usingnamespace std;intmain(){
string s;
cin >> s;int flag =true;for(int i =0; i < s.size()-1; i ++){if(s[i]!='9'){
flag =false;break;}}if(flag){
cout<< s ;}else{for(int i =0; i < s.size()-1; i ++){
cout <<"9";}}return0;}
/*
给定n个电塔的信息(电塔的坐标, 电塔的作用半径)[可以视为一个区间], 电塔作用范围链接的费用为两个端点的距离,问使得所有电塔相连的最小费用。
*/#include<iostream>#include<cstring>#include<algorithm>#include<cstdio>#defineintlonglongusingnamespace std;constint N =2e5+10;typedef pair<int,int> PII;
PII a[N];int n, ans;signedmain(){scanf("%lld",&n);for(int i =0; i < n ; i ++){int x, y;scanf("%lld%lld",&x,&y);
a[i]={x - y, x + y};}sort(a, a + n);int l = a[0].first;int r = a[0].second;for(int i =1; i < n ; i ++){if(a[i].first <= r){
l =min(l, a[i].first);
r =max(r, a[i].second);}else{
ans +=(a[i].first - r);
l =min(l, a[i].first);
r =max(r, a[i].second);}}printf("%lld\n", ans);}
/*
延长线经过圆心时圆弧长度最大
*/#include<bits/stdc++.h>usingnamespace std;constdouble eps =1e-10;double r, x, y, d, w, l, a1, a2, ans, h;signedmain(){
ios::sync_with_stdio(0);
cout << fixed <<setprecision(12);int t;
cin >> t;while(t--){
cin >> r;
cin >> x >> y >> d;
w =sqrt(x * x + y * y);
h, l, ans, a1, a2;if(d < w){
h = w + d;
l = w - d;
a1 = h / r;
a2 = l / r;
ans =(acos(a2)-acos(a1))* r;}else{
h = w + d;
l = d - w;
a1 = h / r;
a2 = l / r;
ans =(acos(-1)-(acos(a2)+acos(a1)))* r;}
cout << ans << endl;}}