2568. Sum of digit

YZAZJL

include

include

include

include

using namespace std;

int main()
{
int n;
cin >> n;
int i;
for(i = 0; i < n; i++){
long long a, b;
cin >> a >> b;
long long sum = a + b;
int cnt = 1;
int j;
if(sum == 0){
cout << cnt << endl;
}
if(sum > 0){
for(j = 1; j < 11; j++){
if(sum / (int)pow(10, j) != 0){
cnt++;
}
}
cout << cnt <<endl;
}
}
return 0;
}

你当前正在回复 博客/题目
存在问题!