Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "iostream"
- int main(int argc, char const *argv[]){
- int total=0;
- std::string str1, str2;
- std::cin >> str1 >> str2;
- for (int i = 0; i < str1.length(); ++i)
- for (int j = 0; j < str2.length(); ++j){
- // cout << str1[i] << " " << str2[j] << " " << (str1[i]-48)*(str2[j]-48) << "\n";
- total += (str1[i]-48)*(str2[j]-48);
- }
- std::cout << total << "\n";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement