Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
2120 A班-高思婕 马里奥的银币3 C++ 解答错误 50 1 MS 296 KB 586 2024-12-14 11:52:41

Tests(1/2):


#include <bits/stdc++.h> using namespace std; int main() { int n,min = 0,max = 0; double sum = 0; cin>>n; int a[10010]; for(int i = 1;i <= n;i++) { cin>>a[i]; } for(int i = 1;i <= n;i++) { min = a[i]; max = a[i]; } for(int i = 1;i <= n;i++) { if(a[i] < min) { min = a[i]; a[i] += 1; } else if(a[i] == min) { a[i] += 1; } else if(a[i] > max) { max = a[i]; a[i] *= 2; } else if(a[i] == max) { a[i] *= 2; } } for(int i = 1;i <= n;i++) { cout<<a[i]<<" "; } return 0; }


测评信息: