- 博客(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
空空如也
Mysql中load data infile时能否为其它字段设值
2015-11-29
杭电ACM1002,老是不能AC,一直都是Wrong Answer
2015-08-05
TA创建的收藏夹 TA关注的收藏夹
TA关注的人