| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 148511 | 张晓冉 | 18统计成绩 | C++ | Compile Error | 0 MS | 0 KB | 485 | 2026-02-23 15:25:00 |
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int cj[100] = {}; double z=0,p=0,zd=0,zx=111111,s = 0; for(int i = 1;i <= n;i++){ cin>>cj[i]; z += cj[i]; } for(int i = 1;i <= n;i++){ if(cj[i]>zd){ zd = cj[i]; }if(cj[i]<zx) zx = cj[i]; } cout<<z<<" "; printf("%2",z/n); cout<<" "; cout<zd<<" "; cout<<zx; return 0; }
Main.cc: In function 'int main()':
Main.cc:19:20: warning: conversion lacks type at end of format [-Wformat=]
printf("%2",z/n);
^
Main.cc:19:20: warning: too many arguments for format [-Wformat-extra-args]
Main.cc:21:14: error: invalid operands of types 'double' and 'const char [2]' to binary 'operator<<'
cout