HDU:3953 I'll play a trick on you
来源:互联网 发布:js获取当前日期 编辑:程序博客网 时间:2024/05/21 11:30
有趣的坑爹的题目。
如果以为第三个数是前两个数之差那你就上当了。
不多说了。
#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>using namespace std;int main(){ int T,kase=0; scanf("%d",&T); while(T--) { char a[105],b[105]; scanf("%s%s",a,b); int la=strlen(a),lb=strlen(b); int ans=0,pos=0; while(pos<la||pos<lb) { if(pos<la) ans+=a[pos]-'0'; if(pos<lb) ans+=b[pos]-'0'; pos++; } printf("Case %d: %d\n",++kase,ans); } return 0;}
- hdu 3953 I'll play a trick on you
- hdu 3953 I'll play a trick on you
- hdu 3953 I'll play a trick on you
- hdu 3953 I'll play a trick on you
- HDU:3953 I'll play a trick on you
- HDu--3935(I'll play a trick on you)
- I'll play a trick on you
- I'll play a trick on you
- hdu 3953 I'll play a trick on you (递推)
- NYOJ 400题 I'll play a trick on you
- nyoj-400-I'll play a trick on you
- NYOJ 400 I'll play a trick on you
- NYOJ 题目400 I'll play a trick on you
- HDU3953 I'll play a trick on you
- ACM-I'll play a trick on you
- ACM_ I'll play a trick on you
- 2011阿里巴巴程序设计公开赛 1003 I'll play a trick on you
- 2011阿里巴巴程序设计公开赛 / 1003 I'll play a trick on you
- Maya: 菜单 编辑网格 >指定不可见面
- remoting与socket、webservice和wcf的比较及优势
- 设计模式学习笔记
- hdu——1711——Number Sequence
- 禁止Windows7系统自动安装驱动程序
- HDU:3953 I'll play a trick on you
- 给定日期求对应的星期 (日期从1900.1.1 星期一开始)
- VC++ 坐标问题总结,控件大小随窗口变化
- hdu 2844 Coins(多重背包优化)
- Maya: 菜单 细分曲面 >纹理>平面映射
- vector表示十字链表+Tarjan+缩点+拓扑排序 详解 poj 2762
- hdu 4681 String 多校第八场
- iOS5 ARC学习笔记:strong、weak等详解
- opencvsharp + unity进行轮廓凸出(ConvexityHull2)