牛客刷题篇

打印 上一主题 下一主题

主题 552|帖子 552|积分 1656

1.   计算体重指数 00:00:00⸺00 :10:34题号:(⽆) 链接:  https://www.nowcoder.com/que     stionTerminal/422f6341cf1b4212a7f8c703df111389   
  1. #include <iostream>
  2. using namespace std;
  3. int main() {
  4.    int tz,sg;
  5.    cin>>tz>>sg;
  6.    double ret=tz*1.0/(sg*sg)*10000;
  7.    printf("%.2lf",ret);
  8. }
复制代码

    2.   计算三⻆形的周⻓和⾯积 00:10:34⸺00 :20:35题号:BC34 链接:  https://www.nowcode     r.com/practice/109a44d649a142d483314e8a57e2c710?tpId=290&tqId=39822&ru=/exam/oj  
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5.     int a ,b ,c ;
  6.     cin>>a>>b>>c;
  7.     double circ=a+b+c;
  8.     double cir=circ/2.0;
  9.     double area=sqrt(cir*(cir-a)*(cir-b)*(cir-c));
  10.     printf("circumference=%.2lf area=%.2lf",circ,area);
  11. }
复制代码

   3.   计算球体的体积00:20:35⸺00:30:49 题号:(⽆)链接:  https://www.nowcoder.com/qu     estionTerminal/0f5d9bfcd63b47fda2052a583b1fbd1f   
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5.     double pi=3.1415926;
  6.     double r;
  7.     cin>>r;
  8.     double V=4/3.0*pi*pow(r,3);
  9.     printf("%.3lf",V);
  10. }
复制代码

    4.   结果的输⼊输出00:30:49⸺00: 38:50题号:BC11 链接:  https://www.nowcoder.com/pract     ice/eb49750ef0de47168c21761de086d97c?tpId=290&tqId=39799&ru=/exam/oj  
  1. #include<bits/stdc++.h>
  2. int main()
  3. {
  4.     int s1,s2,s3;
  5.     scanf("%d%d%d",&s1,&s2,&s3);
  6.     printf("score1=%d,score2=%d,score3=%d",s1,s2,s3);
  7. }
复制代码

   5.   变种⽔仙花数00:38:50⸺00 :48:55题号:BC92 链接:  https://www.nowcoder.com/practice/     c178e3f5cc4641dfbc8b020ae79e2b71?tpId=290&tqId=39880&ru=/exam/oj   
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5.     for(int i=10000;i<=99999;i++)
  6.     {
  7.         int sum=0;
  8.         for(int j=10;j<=10000;j=j*10)
  9.         {
  10.             sum=sum+(i%j)*(i/j);
  11.         }
  12.         if(i==sum)
  13.         {
  14.             cout<<sum<<" ";
  15.         }
  16.     }
  17. }
复制代码

     6.   KIKI算数00:48:55⸺01:07:42 题号:BC49 链接:  https://www.nowcoder.com/practice/b     caf710fb58a44e1b678a890e6e90d7c?tpId=290&tqId=39837&ru=/exam/oj   
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5.     int a,b;
  6.     cin>>a>>b;
  7.     if(a>=100)
  8.     {
  9.         a=a%100;
  10.     }
  11.     if(b>=100)
  12.     {
  13.         b=b%100;
  14.     }
  15.     int ret=a+b;
  16.     if(ret>=100)
  17.     {
  18.         ret=ret%100;
  19.     }
  20.     cout<<ret;
  21. }
复制代码

    7.   浮点数的个位数字01:08:25⸺01:12:53题号:BC24 链接:  https://www.nowcoder.com/p     ractice/ffa94d27c6534396aef38813535c279f?tpId=290&tqId=39812&ru=/exam/oj  
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5.     double a;
  6.     cin>>a;
  7.     int ret=(int)a%10;
  8.    
  9.     cout<<ret;
  10. }
复制代码
 
    8.   你能活多少秒?01:12:53⸺01:19:28题号:BC32 链接:  https://www.nowcoder.com/pra     ctice/e1d1bd99fee34b66ae3c777b74d555c8?tpId=290&tqId=39820&ru=/exam/oj
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5.     long long ret;
  6.     int a;
  7.     cin>>a;
  8.     ret=a*3.156*pow(10,7);
  9.     cout<<ret;
  10. }
复制代码
 

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
回复

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

愛在花開的季節

金牌会员
这个人很懒什么都没写!

标签云

快速回复 返回顶部 返回列表