P1012求调
  • 板块学术版
  • 楼主k102937
  • 当前回复0
  • 已保存回复0
  • 发布时间2025/1/18 22:17
  • 上次更新2025/1/19 10:09:29
查看原帖
P1012求调
1267901
k102937楼主2025/1/18 22:17

这道题我编译过不了但是在不会修,麻烦大佬看一下怎么搞。

#include<bits/stdc++.h>
using namespace std;
string a[10000];
int main()
{
    int n,x,maxx=-1;
    cin>>n;
    for(int i=1;i<=n;i++)
    {
        cin>>x;
        if(x>maxx)
        {
            a=x+maxx;
        }
        else
        {
            a=a+x;
        }
    }
    cout<<a;
    return 0;
}
2025/1/18 22:17
加载中...