Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
165344 王慕哲 输出学生成绩 C++ Accepted 1 MS 276 KB 445 2026-11-14 17:33:05

Tests(1/1):


Code:

#include <bits/stdc++.h> using namespace std; int main() { int a[3][4],n; double s; for(int i=0;i<3;i++){ for(int j=0;j<4;j++){ cin>>a[i][j]; s+=a[i][j]; } } cin>>n; cout << fixed << setprecision(2) << s/12<<endl; for(int i=0;i<3;i++){ for(int j=0;j<4;j++){ if(i==n){ cout<<a[i][j]<<" "; } } } }