题解 | #kiki算数#
kiki算数
http://www.nowcoder.com/practice/bcaf710fb58a44e1b678a890e6e90d7c
int delete(int a)
{
int b = a;
int c = a;
int count = 0;
while (a > 0)
{
a = a / 10;
count++;
}
int arr[20] = { 0 };
for (int i = 0; i < count; i++)
{
arr[i] = b % 10;
b = b / 10;
}
if (c> 100)
{
c= c % 100;
if (arr[1] == 0)
{
c = c % 10;
}
}
else {
c = c;
}
return c;
}
int sum(int a, int b)
{
int c = a + b;
int d = c;
if (c >= 100)
{
c = c % 100;
d = c;
}
else {
d = d;
}
return d;
}
int main()
{
int a, b;
scanf("%d %d", &a, &b);
int c = delete(a);
int d = delete(b);
int sum1 = sum(c, d);
printf("%d", sum1);
return 0;
}