1 条题解
-
0
C :
#include<stdio.h> void main() { int r1,r2; double s,p=3.14; scanf("%d%d",&r1,&r2); s=p*r1*r1-p*r2*r2; printf("%.2f",s); }
C++ :
#include<bits/stdc++.h> using namespace std; int main(){ int r1,r2; double s,pi = 3.14; cin>>r1>>r2; s = pi * r1 * r1 - pi * r2 * r2; cout<<fixed<<setprecision(2)<<s<<endl; return 0; }
Python :
a,b=map(int,input().split()) s=a*a*3.14-b*b*3.14 print('{:.2f}'.format(s))
- 1
信息
- ID
- 2258
- 时间
- 1000ms
- 内存
- 16MiB
- 难度
- (无)
- 标签
- 递交数
- 0
- 已通过
- 0
- 上传者