day4 CodeForces 616A Comparing Two Long Integers
来源:互联网 发布:js实现excel上传文件 编辑:程序博客网 时间:2024/05/18 02:28
水。。
#include"iostream"#include"stdio.h"#include"string.h"using namespace std;int main(){ char s1[1000010],s2[1000010]; scanf("%s",s1); scanf("%s",s2); int p=0,q=0; while(s1[p]=='0') p++; while(s2[q]=='0') q++; //cout<<strlen(s1)-p<<strlen(s2)-q<<endl; if(strlen(s1)-p>strlen(s2)-q) cout<<'>'<<endl; else if(strlen(s1)-p<strlen(s2)-q) cout<<'<'<<endl; else { while(s1[p]==s2[q]&&p<strlen(s1)&&q<strlen(s2)) {p++;q++;} //cout<<p<<q<<endl; if(p==strlen(s1)&&q==strlen(s2)) cout<<'='<<endl; else if(s1[p]>s2[q]) cout<<'>'<<endl; else if(s1[p]<s2[q]) cout<<'<'<<endl; } return 0;}
0 0
- day4 CodeForces 616A Comparing Two Long Integers
- CodeForces 616A Comparing Two Long Integers
- CodeForces 616A Comparing Two Long Integers
- CodeForces 616A Comparing Two Long Integers
- CodeForces 616A Comparing Two Long Integers
- CodeForces 616 A. Comparing Two Long Integers(水~)
- CodeForces 616A Comparing Two Long Integers【字符串】
- CF Comparing Two Long Integers 616A
- cf 616A Comparing Two Long Integers
- A. Comparing Two Long Integers
- Educational Codeforces Round 5 A. Comparing Two Long Integers
- Codeforces--616A--Comparing Two Long Integers(模拟水题)
- CodeForces - 616A Comparing Two Long Integers (模拟)比较两个数大小
- CodeForce 616A Comparing Two Long Integers 字符串比较
- Comparing Two Long Integers
- Educational Codeforces Round 5-A. Comparing Two Long Integers(模拟)
- Educational Codeforces Round 5 A. Comparing Two Long Integers (水)
- Codeforces 872 A Search for Pretty Integers
- HDU 5730 2016多校Contest 1 G题【CDQ分治和FFT模板】
- 语义化标签
- 线程之间共享的内容
- poj 1985 Cow Marathon (树的直径 模板题)
- STM32之I2C_EEPROM读写
- day4 CodeForces 616A Comparing Two Long Integers
- Python学习笔记1
- HDU-2444 The Accomodation of Students(二分图判断+最大二分匹配)
- Java子类实例化过程和Java方法重写与super关键字
- 2029--回文字符串
- day5 HDU 2899 Strange fuction
- 海量数据的算法
- 树莓派 Step by step
- canvas 画布、缓存的相关内容