Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- char a[9], b[9];
- long long hasil =0, len_a, len_b,x,y;
- int main(){
- scanf("%s%s", a, b), len_a=strlen(a), len_b =strlen(b);
- for(int i=0;i<len_a;i++){
- for(int j=0;j<len_b;j++){
- x = a[i] - 48;
- y = b[j] - 48;
- hasil+=(x*y);
- // printf("%lld %lld\n", x, y);
- }
- }
- printf("%lld\n", hasil);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement