Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
78825 邓嘉瑶 字符串中最大的数字 C++ Runtime Error 0 MS 108 KB 234 2024-06-29 11:18:55

Tests(0/10):


Code:

#include<bits/stdc++.h> using namespace std; char a[2100000000]; int main() { scanf("%s",a); int len=strlen(a); int mx=-2e9; for(int i=0;i<len;i++){ if(a[i]>a[mx]){ mx=i; } } cout<<a[mx]; return 0; }


Run Info:

Runtime Error:Segmentation fault