ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#185450 | #8. 小w、小j和小z | wxz | 0 | 0ms | 1236kb | C++11 | 556b | 2023-09-29 20:41:14 | 2023-09-29 20:41:16 |
answer
#include<bits/stdc++.h>
using namespace std;
int a[100000+10],b[1000000+10],c[100000000+10];
string a2,b2;
int main()
{
cin>>a2>>b2;
int lena,lenb,lenmax;
lena=a2.size();
lenb=b2.size();
lenmax=max(lena,lenb);
for(int i=lena-1;i>=0;i--)
{
a[lena-1-i]=a2[i]-'0';
}
for(int i=lenb-1;i>=0;i--)
{
b[lenb-1-i]=b2[i]-'0';
}
for(int i=0;i<lenmax;i++)
{
c[i]=c[i]+b[i]+a[i];
c[i+1]=c[i]/10;
c[i]=c[i]%10;
}
while(c[lenmax])
{
lenmax++;
}
for(int i=lenmax-1;i>=0;i--)
{
cout<<c[i];
}
return 0;
}
Details
小提示:点击横条可展开更详细的信息
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 1232kb
input:
20 10 -715624307 -28629151 957936621 17210368 -753657459 59049 -40974960 5153632 -402454312 -3450252...
output:
30
result:
wrong answer expected 11.3999000000, found 30.0000000000
Subtask #2:
score: 0
Wrong Answer
Test #6:
score: 0
Wrong Answer
time: 0ms
memory: 1236kb
input:
200 10 -487405787 3200000 725249085 28629151 -671026855 -4084101 38046635 45435424 -188495128 643634...
output:
210
result:
wrong answer expected 0.0039000000, found 210.0000000000
Subtask #3:
score: 0
Skipped
Subtask #4:
score: 0
Wrong Answer
Test #18:
score: 0
Wrong Answer
time: 0ms
memory: 1232kb
input:
2000 10 882856800 -387420489 866607093 -134217728 481381898 1 -488180557 1953125 -783185249 -19683 -...
output:
2010
result:
wrong answer expected 0.0001000000, found 2010.0000000000
Subtask #5:
score: 0
Skipped
Subtask #6:
score: 0
Skipped