UVA100
来源:互联网 发布:合肥组装电脑淘宝 编辑:程序博客网 时间:2024/06/15 23:22
//100#include"iostream"#include"algorithm"#include"vector"#include"map"#include"string"#include"cctype"#include"deque"#include"queue"#include"stack"#include"cstdio"#include"cmath"#include"set"#include"sstream"using namespace std;int main() //这题也是够了。。。{//freopen("a.txt","r",stdin);int s,t;while(scanf("%d%d",&s,&t)==2){int ss=s,tt=t; //输出时候按原样输出if(s>t) //交换 他给的数据不一定按顺序swap(s,t);int k;int i;int man=0;for(i=s;i<=t;i++){k=0;++k;long long int per=i;//防止溢出while(per!=1){if(per%2){per=3*per+1;++k;}else {per/=2;++k;}}if(k>man) man=k;}printf("%d %d %d\n",ss,tt,man);}return 0;}/*1 10100 200201 210900 1000*/
0 0
- uva100
- UVA100
- UVA100
- PC110101/UVa100
- UVA100题感想
- uva100 3+1
- uva100解题报告
- Uva100——乱搞题
- UVA100输入顺序小坑
- uva100 The 3n + 1 problem
- uva100 The 3n + 1 problem
- UVa100 The 3n+1 problem
- 1.6.1 3n+1问题 UVA100
- uva100 The 3n + 1 problem
- UVa100 - The 3n + 1 problem
- UVA100- The 3n + 1 problem
- UVA100 The 3n + 1 problem
- UVA100 The 3n + 1 problem
- 冒泡排序
- 写文献综述的二十八个要点
- 备忘录
- 数据库的设计范式
- Android 开发笔记(准备工作)
- UVA100
- 2016"百度之星" - 资格赛(Astar Round1)Problem A 线段树区间查询
- Android学习笔记十五:wifi连接,获取名字,IP地址
- TextView整理
- MSSQL之六 数据库设计
- 异常处理注意点
- crawler4j源码解析
- Linux 安装svn
- Caused by: org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be