自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 问答 (2)
  • 收藏
  • 关注

原创 ACM1064:

关键是控制浮点数小数点后数字的输出 #include #include using namespace std; int main(){ float a=0,b=0; for (int i = 0; i < 12; i++) { cin>>a; b+=a; } b=b/12; cout<<"$"; cout <<setiosflags(ios::fixed); c

2015-08-06 14:58:21 342

原创 ACM1008:Elevator

容易犯的错误就是相邻两数为统一楼层时,应该+5,而不是+0! #include using namespace std; int main(){ int N,data[101]={0},sum; while(cin>>N){ if(N==0){ break; } sum=0; memset(data,0,sizeof(data)); for (int i

2015-08-05 23:48:15 257

原创 ACM1089:A+B for Input-Output Practice (I)

用字符串截取转整形,总是不能AC #include using namespace std; int main(){ int a=0,b=0; while (cin>>a>>b) { cout<<a+b<<endl; } return 0; }

2015-08-05 14:21:59 329

原创 ACM1001:Sum Problem

#include using namespace std; int main(){ int a,tmp,sum; while(cin>>a){ sum=0; for(tmp=1;tmp<=a;tmp++){ sum+=tmp; } cout<<sum<<endl; cout<<""<<endl; } return 0; }

2015-08-04 14:16:48 261

原创 acm1000:A + B Problem

新学习c++,做acm联系,在这做一下记录,新手,代码可能质量不高。 #include #include //using std::cin; //using std::cout; //using std::endl; //using std::string; using namespace std; int main(){ int a=0;int b=0; int index=0;

2015-08-04 13:49:41 240

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除