您的位置:首页 > 其它

FZU 2089 数字游戏

2016-03-04 18:20 260 查看
[b]Problem 2089 数字游戏[/b]

#include <iostream>
#include <cstdio>
#include <string>
#include <set>
using namespace std;

int main()
{
//freopen("in.txt","r",stdin);
long long a,b;
int n;
cin>>n;
while(n--)
{
cin>>a>>b;
int cnt=0;
long long c=a+b;
while(c/10!=0||c%10!=0)
{
if(c%10==5)cnt++;
c/=10;
}
printf("%d\n",cnt);
}
return 0;
}


View Code
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: