| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 152147 | 杨启宏 | 字符串中最大的数字II | C++ | Wrong Answer | 1 MS | 272 KB | 496 | 2026-04-21 18:51:45 |
#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*=10000000; b=long(n); while(b!=0){ a=b%10; if(a>max){ max=a; } b/=10; } cout<<max; return 0; }
------Input------
1.23456789
------Answer-----
9
------Your output-----
8