Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
160062 李昱龙 字符串中最大的数字 C++ Compile Error 0 MS 0 KB 205 2026-09-12 14:31:00

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; string s1; int main(){ cin>>s1; int n=s1.size(); char h=s[0]; for(int i=1;i<n;i++){ if(s1[i]>h){ h=s1[i]; } } cout<<h; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:9: error: 's' was not declared in this scope
  char h=s[0];
         ^