Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
5314 | 孙浩楠 | 五个小朋友分巧克力 | C++ | 通过 | 100 | 0 MS | 252 KB | 668 | 2020-07-29 10:58:31 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,p1,p2,p3,p4,p5; cin>>n; p1=n;p2=n;p3=n;p4=n;p5=n; //5 p1/=2;p2/=2;p3/=2;p4/=2;p5=p1+p2+p3+p4+p5; // cout<<p1<<" "<<p2<<" "<<p3<<" "<<p4<<" "<<p5<<endl; //4 p1/=2;p2/=2;p3/=2;p5/=2;p4=p1+p2+p3+p4+p5; // cout<<p1<<" "<<p2<<" "<<p3<<" "<<p4<<" "<<p5<<endl; //3 p1/=2;p2/=2;p4/=2;p5/=2;p3=p1+p2+p3+p4+p5; // cout<<p1<<" "<<p2<<" "<<p3<<" "<<p4<<" "<<p5<<endl; //2 p1/=2;p3/=2;p4/=2;p5/=2;p2=p1+p2+p3+p4+p5; // cout<<p1<<" "<<p2<<" "<<p3<<" "<<p4<<" "<<p5<<endl; //1 p2/=2;p3/=2;p4/=2;p5/=2;p1=p1+p2+p3+p4+p5; cout<<p1<<" "<<p2<<" "<<p3<<" "<<p4<<" "<<p5<<endl; return 0; }