题解 | #特殊乘法#
特殊乘法
http://www.nowcoder.com/practice/a5edebf0622045468436c74c3a34240f
#include <stdio.h>
#include <string.h>
#define MAX 10
int main(void)
{
int answr = 0;
char s1[MAX], s2[MAX];
scanf("%s %s", s1, s2);
for (short i = 0; i < strlen(s1); i++)
{
for (short j = 0; j < strlen(s2); j++)
{
answr += (s1[i] - '0') * (s2[j] - '0');
}
}
printf("%d\n", answr);
return 0;
}
顺丰集团工作强度 321人发布