记录编号 | 597242 | 评测结果 | AAAAAAAAAA | ||
---|---|---|---|---|---|
题目名称 | [USACO Feb08] 奶牛式乘法 | 最终得分 | 100 | ||
用户昵称 | 是否通过 | 通过 | |||
代码语言 | C++ | 运行时间 | 0.030 s | ||
提交时间 | 2024-11-25 20:27:37 | 内存使用 | 3.54 MiB | ||
- #include<bits/stdc++.h>
- #define int long long
- using namespace std;
- int a,b,x;
- int ans;
- signed main()
- {
- freopen("cowmult.in","r",stdin);
- freopen("cowmult.out","w",stdout);
- scanf("%lld%lld",&a,&b);
- while(a)
- {
- x=b;
- while(x)
- {
- ans+=(a%10)*(x%10);
- x/=10;
- }
- a/=10;
- }
- printf("%lld",ans);
- return 0;
- }