Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
88531 | 赵天瑜 | 05买水果 | C++ | Wrong Answer | 0 MS | 264 KB | 446 | 2024-08-19 11:46:24 |
#include<iostream> #include<cstdio> using namespace std; int main() { int banana=5; int apple=8; int grape=12; double avg; printf("平均单价为%.3lf元\n",(banana+apple+grape)/3.0); cout<<"香蕉可以买"<<39/5<<"斤,剩余"<<39%5<<"元"<<endl; cout<<"苹果可以买"<<39/8<<"斤,剩余"<<39%8<<"元"<<endl; cout<<"葡萄可以买"<<39/12<<"斤,剩余"<<39%12<<"元"<<endl; return 0; }
------Input------
0
------Answer-----
8.333 7 4 4 7 3 3
------Your output-----
平均单价为8.333元 香蕉可以买7斤,剩余4元 苹果可以买4斤,剩余7元 葡萄可以买3斤,剩余3元