FZU 2089 数字游戏
2016-03-04 18:20
260 查看
[b]Problem 2089 数字游戏[/b]
View Code
#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
相关文章推荐
- Android L+ Theme 与 Toolbar
- 实用的cmd命令
- 【Java开发者自学笔记】前言
- Linux系统中MySQL数据库操作命令(未整理)
- Python argsort()
- [POJ3422]Kaka's Matrix Travels 做题笔记
- LeetCode OJ ---- Longest Palindromic Substring
- R语言数据挖掘资料
- leetcode笔记:Bitwise AND of Numbers Range
- static const vs. extern const
- ubuntu中的sources.list文件
- Win 8.1/10 如何设置以Administrator身份启动cmd
- Android Studio 上传SVN标准全过程
- HTTPS科普扫盲帖
- HDU 1213 - How Many Tables
- 属性动画
- jquery的ajax同步和异步
- 框架汇总
- POJ 1611 - The Suspects
- 数字游戏