1. 计算体重指数 00:00:00⸺00 :10:34题号:(⽆) 链接: https://www.nowcoder.com/que stionTerminal/422f6341cf1b4212a7f8c703df111389 - #include <iostream>
- using namespace std;
- int main() {
- int tz,sg;
- cin>>tz>>sg;
- double ret=tz*1.0/(sg*sg)*10000;
- printf("%.2lf",ret);
- }
复制代码
2. 计算三⻆形的周⻓和⾯积 00:10:34⸺00 :20:35题号:BC34 链接: https://www.nowcode r.com/practice/109a44d649a142d483314e8a57e2c710?tpId=290&tqId=39822&ru=/exam/oj - #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- int a ,b ,c ;
- cin>>a>>b>>c;
- double circ=a+b+c;
- double cir=circ/2.0;
- double area=sqrt(cir*(cir-a)*(cir-b)*(cir-c));
- printf("circumference=%.2lf area=%.2lf",circ,area);
- }
复制代码
3. 计算球体的体积00:20:35⸺00:30:49 题号:(⽆)链接: https://www.nowcoder.com/qu estionTerminal/0f5d9bfcd63b47fda2052a583b1fbd1f - #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- double pi=3.1415926;
- double r;
- cin>>r;
- double V=4/3.0*pi*pow(r,3);
- printf("%.3lf",V);
- }
复制代码
4. 结果的输⼊输出00:30:49⸺00: 38:50题号:BC11 链接: https://www.nowcoder.com/pract ice/eb49750ef0de47168c21761de086d97c?tpId=290&tqId=39799&ru=/exam/oj - #include<bits/stdc++.h>
- int main()
- {
- int s1,s2,s3;
- scanf("%d%d%d",&s1,&s2,&s3);
- printf("score1=%d,score2=%d,score3=%d",s1,s2,s3);
- }
复制代码
5. 变种⽔仙花数00:38:50⸺00 :48:55题号:BC92 链接: https://www.nowcoder.com/practice/ c178e3f5cc4641dfbc8b020ae79e2b71?tpId=290&tqId=39880&ru=/exam/oj - #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- for(int i=10000;i<=99999;i++)
- {
- int sum=0;
- for(int j=10;j<=10000;j=j*10)
- {
- sum=sum+(i%j)*(i/j);
- }
- if(i==sum)
- {
- cout<<sum<<" ";
- }
- }
- }
复制代码
6. KIKI算数00:48:55⸺01:07:42 题号:BC49 链接: https://www.nowcoder.com/practice/b caf710fb58a44e1b678a890e6e90d7c?tpId=290&tqId=39837&ru=/exam/oj - #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- int a,b;
- cin>>a>>b;
- if(a>=100)
- {
- a=a%100;
- }
- if(b>=100)
- {
- b=b%100;
- }
- int ret=a+b;
- if(ret>=100)
- {
- ret=ret%100;
- }
- cout<<ret;
- }
复制代码
7. 浮点数的个位数字01:08:25⸺01:12:53题号:BC24 链接: https://www.nowcoder.com/p ractice/ffa94d27c6534396aef38813535c279f?tpId=290&tqId=39812&ru=/exam/oj - #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- double a;
- cin>>a;
- int ret=(int)a%10;
-
- cout<<ret;
- }
复制代码
8. 你能活多少秒?01:12:53⸺01:19:28题号:BC32 链接: https://www.nowcoder.com/pra ctice/e1d1bd99fee34b66ae3c777b74d555c8?tpId=290&tqId=39820&ru=/exam/oj - #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- long long ret;
- int a;
- cin>>a;
- ret=a*3.156*pow(10,7);
- cout<<ret;
- }
复制代码
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。 |