# include & lt; Bits/stdc++. H>
using namespace std;
Int main ()
{
Long long int x, y, z, n, m, result, num;
Int t, I, j, len;
Char a, [30].
The scanf (" % d ", & amp; t);
for(j=1; J<=t; J++)
{
Result=0;
x=0;
The scanf (" % s ", a);
Len=strlen (a);
for(i=0; iX=x * 10 + a, [I] - '0'.
Y=a [len - 4] - '0'.
Z=a [len - 3] - '0'.
N=a/len - 2 - '0'.
M=a [] len - 1 - '0'.
Num=x + y z * n/m;
Result=Max (result, num);
Y=0;
for(i=1; iY=y * 10 + a, [I] - '0'.
X=a, [0] - '0'.
Z=a [len - 3] - '0'.
N=a/len - 2 - '0'.
M=a [] len - 1 - '0'.
Num=x + y z * n/m;
Result=Max (result, num);
If (len> 5)
{
x=0;
for(i=0; iX=x * 10 + a, [I] - '0'.
Y=a [len - 5] - '0'.
Z=a [len - 4] - '0'.
N=a [len - 3] - '0'.
M=(a/len - 2 - '0') * 10 + a] [len - 1 - '0';
Num=x + y z * n/m;
Result=Max (result, num);
Y=0;
for(i=1; iY=y * 10 + a, [I] - '0'.
X=a, [0] - '0'.
Z=a [len - 4] - '0'.
N=a [len - 3] - '0'.
M=(a/len - 2 - '0') * 10 + a] [len - 1 - '0';
Num=x + y z * n/m;
Result=Max (result, num);
}
Printf (" Case # % d: % LLD \ n ", j, result);
}
return 0;
}
For why I always WA code
Control the AC code no difference feeling why can WA checked several times did not find error hope to have a big help to see
AC code:
//
//by coolxxx
//# include
#include
#include
#include
#include
#include
CodePudding user response:
Title link: https://vjudge.net/contest/405628#problem/F