Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
152148 杨启宏 字符串中最大的数字II C++ Wrong Answer 1 MS 272 KB 497 2026-04-21 18:52:59

Tests(3/10):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ long long a,max=0,b; double n; cin>>n; n=abs(n); n*=100000000; b=long(n); while(b!=0){ a=b%10; if(a>max){ max=a; } b/=10; } cout<<max; return 0; }


Run Info:

------Input------
1.23456789
------Answer-----
9
------Your output-----
8