1177. Take Your Vitamins (简单类)
来源:互联网 发布:身份证借去开淘宝店 编辑:程序博客网 时间:2024/06/06 05:49
#include <iostream>#include <string>#include <vector>#include <iomanip>using namespace std;class N{public: double a,r; string u,v; double p() { return a/r*100; } bool b() { return p()>=1; }};int main(){ vector<N> v1,v2; N temp; while(cin>>temp.a>>temp.u>>temp.r) { cin.get(); getline(cin,temp.v); if(temp.a<0) break; if(!temp.b()) v2.push_back(temp); else v1.push_back(temp); } for(int i=0;i<v1.size();i++) cout<<v1[i].v<<" "<<fixed<<setprecision(1)<<v1[i].a<<" "<<v1[i].u<<" "<<setprecision(0)<<v1[i].p()<<'%'<<endl; cout<<"Provides no significant amount of:"<<endl; for(int i=0;i<v2.size();i++) cout<<v2[i].v<<endl; // system("pause"); return 0;}
- 1177. Take Your Vitamins (简单类)
- Sicily 1177. Take Your Vitamins
- sicily 1177. Take Your Vitamins
- sicily 1177 Take Your Vitamins
- POJ 2810 - Take Your Vitamins
- POJ 2810 Take Your Vitamins 笔记
- Take Me To Your Heart
- Take me to your heart
- take me to your heart
- take me to your heart
- Take me to your heart
- Take me to your heart..
- Take me to your heart
- Take Me to Your Heart
- Take me to your heat
- Take me to your heart
- take me to your heart
- Take me to your heart
- JVM 深入笔记
- Http之GET/POST请求区别
- ThreadLocal类的学习
- Asp.Net文件和文件夹操作方法总结
- Hibernate主键生成策略与save()方法是否发sql语句的研究
- 1177. Take Your Vitamins (简单类)
- 在ubuntu 下安装 遇到ttf-mscorefonts-installer 问题
- safari + finder + 全屏
- Hadoop HDFS源码学习笔记(六)--fetchBlockByteRange
- 扫描可以使用的NFS Server目录
- 类似于QQ游戏百万人同时在线的服务器架构实现
- 奇艺QSV文件格式简单分析
- 离散数学复习笔记
- 封装PHP mail函数发送HTML邮件并使用中文发件人且自定义发件人邮箱地址