import java.util.Arrays;
import java.util.Scanner;
public class Main {
publicstaticvoidmain(String[] args) {
// TODO Auto-generated method stub
Scannerinput = newScanner(System.in);
while(input.hasNextLong())
{
longn1 = input.nextLong();
longn2 = input.nextLong();
if(n1 == 0 && n2 == 0)
{
break;
}
longn3 = n1+n2;
intc = 0;
while(n3 > 0)
{
if(n3 % 10 <= n2 % 10 && n3 % 10 < n1 % 10 || n3 % 10 < n2 % 10 && n3 % 10 <= n1 % 10)
{
c++;
}
n3 /= 10;
n2 /= 10;
n1 /= 10;
}
if(c == 0)
{
System.out.println("No carry operation.");
}
else
{
System.out.println(c + " carry operation.");
}
}
}
}
複數形要加s
ans+" carry operations"
or
ans+" carry operation"