题解 | #特殊乘法#

特殊乘法

https://www.nowcoder.com/practice/a5edebf0622045468436c74c3a34240f

#include <iostream>
#include <cstdio>
#include <string>

using namespace std;

int main() {
    string str1,str2;
    while(cin>>str1>>str2){
        int sum=0;
        for(int i=0;i<str1.size();i++){
            for(int j=0;j<str2.size();j++){
                sum+=(str1[i]-'0')*(str2[j]-'0');
            }
        }
        cout<<sum<<endl;
    }
    return 0;
}

考研复试机试 文章被收录于专栏

考研复试机试

全部评论

相关推荐

不愿透露姓名的神秘牛友
昨天 12:02
ssob上原来真有BOSS啊
硫蛋蛋:这种也是打工的,只不是是给写字楼房东打工
点赞 评论 收藏
分享
Rena1ssanc...:对的,要是面评没太烂,勤更新简历等捞就行了,腾讯可以无限复活
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务