记录编号 |
128079 |
评测结果 |
AAAAAAAAAA |
题目名称 |
[USACO Feb08] 奶牛式乘法 |
最终得分 |
100 |
用户昵称 |
dracul |
是否通过 |
通过 |
代码语言 |
C++ |
运行时间 |
0.004 s |
提交时间 |
2014-10-16 20:43:54 |
内存使用 |
0.31 MiB |
显示代码纯文本
#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main(){
freopen("cowmult.in","r",stdin);
freopen("cowmult.out","w",stdout);
int m,n,a,b,c,d,e,f,g,h,i,j,k,l,o,p,q,r,s,t,u;
cin>>m>>n;
if(m>=1&n>=1&m<=1000000000&n<=1000000000){
a=m/100000000;
b=n/100000000;
c=(m-100000000*a)/10000000;
d=(n-100000000*b)/10000000;
e=(m-100000000*a-10000000*c)/1000000;
f=(n-100000000*b-10000000*d)/1000000;
g=(m-100000000*a-10000000*c-1000000*e)/100000;
h=(n-100000000*b-10000000*d-1000000*f)/100000;
i=(m-100000000*a-10000000*c-1000000*e-100000*g)/10000;
j=(n-100000000*b-10000000*d-1000000*f-100000*h)/10000;
k=(m-100000000*a-10000000*c-1000000*e-100000*g-10000*i)/1000;
l=(n-100000000*b-10000000*d-1000000*f-100000*h-10000*j)/1000;
o=(m-100000000*a-10000000*c-1000000*e-100000*g-10000*i-1000*k)/100;
p=(n-100000000*b-10000000*d-1000000*f-100000*h-10000*j-1000*l)/100;
q=(m-100000000*a-10000000*c-1000000*e-100000*g-10000*i-1000*k-100*o)/10;
r=(n-100000000*b-10000000*d-1000000*f-100000*h-10000*j-1000*l-100*p)/10;
s=m-100000000*a-10000000*c-1000000*e-100000*g-10000*i-1000*k-100*o-10*q;
t=n-100000000*b-10000000*d-1000000*f-100000*h-10000*j-1000*l-100*p-10*r;
u=(a+c+e+g+i+k+o+q+s)*(b+d+f+h+j+l+p+r+t);
cout<<u<<endl;
}
return 0;
}