Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
6863 邓小龙 05买水果 C++ Accepted 0 MS 252 KB 477 2025-03-22 19:38:32

Tests(1/1):


Code:

#include<iostream>//cin,cout #include<iomanip>//setprecision #include<cstdio>//scanf,printf using namespace std; int main(){ //香蕉,苹果,葡萄 int b=5,a=8,g=12; double average; average = (b+a+g)/3.0; //cout<<fixed<<setprecision(3)<<average<<endl; printf("%.3lf\n",average); //香蕉能买39/b斤,剩下39%b元 printf("%d %d\n",39/b,39%b); printf("%d %d\n",39/a,39%a); printf("%d %d\n",39/g,39%g); return 0; }