# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
160312 | model_code | Split (info1cup19_split) | C++17 | 2 ms | 376 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int y,nr,i,a[20];
long long x,z;
int main()
{
scanf ("%lld", &x);
assert ((x>=1) && (x<1000000000000000000LL));
z=(0LL)+x;
nr=0;
while (z!=0)
{
nr++;
z/=10;
}
assert ((nr%2)==0);
nr=0;
while (x>0)
{
a[++nr]=x%10;
x/=10;
}
y=0;
for (i=nr;i>=((nr/2)+1);i--)
y=y*10+a[i];
z=0;
for (i=(nr/2);i>=1;i--)
z=z*10+a[i];
printf ("%d %d\n", y, z);
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |