PAT乙1001
我脑洞大了。。。。。
以为是个找规律。。。。。
原来只是模拟。。。。。
我相信肯定是有规律的。。。。。
但是我就是不愿意了。。。。。
#include<cstdio>
#include<cstdlib>
#include<iostream>
#include<algorithm> using namespace std; int main()
{
int n;
int sum=;
cin >> n;
while (n!=)
{
if(n% == )
n/=;
else
n = (n*+)/;
sum++;
}
cout<<sum<<endl;
return ;
}
PAT乙1001的更多相关文章
- PAT (BL)  1001
		链接:http://pat.zju.edu.cn/contests/pat-b-practise/1001 /* 1001. 害死人不偿命的(3n+1)猜想 (15) 卡拉兹(Callatz)猜想: ... 
- PAT乙级   1001. 害死人不偿命的(3n+1)猜想 (15)
		1001. 害死人不偿命的(3n+1)猜想 (15) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue 卡拉兹(Ca ... 
- PAT甲级 1001 A+B Format
		题目链接:https://pintia.cn/problem-sets/994805342720868352/problems/994805528788582400 1001 A+B Format ( ... 
- [C++]PAT乙级1001.害死人不偿命的(3n+1)猜想(15/15)
		/* 1001.害死人不偿命的(3n+1)猜想 (15) 卡拉兹(Callatz)猜想: 对任何一个自然数n,如果它是偶数,那么把它砍掉一半:如果它是奇数,那么把(3n+1)砍掉一半.这样一直反复砍下 ... 
- PAT Basic 1001
		1001 害死人不偿命的(3n+1)猜想 (15 分) 卡拉兹(Callatz)猜想: 对任何一个正整数 n,如果它是偶数,那么把它砍掉一半:如果它是奇数,那么把 (3n+1) 砍掉一半.这样一直反复 ... 
- PAT 甲级 1001 A+B Format (20)(20 分)
		1001 A+B Format (20)(20 分) Calculate a + b and output the sum in standard format -- that is, the dig ... 
- PAT 甲级1001 A+B Format (20)(C++ -思路)
		1001 A+B Format (20)(20 分) Calculate a + b and output the sum in standard format -- that is, the dig ... 
- PAT甲 1001. A+B Format (20)                                                                                            2016-09-09 22:47             25人阅读              评论(0)              收藏
		1001. A+B Format (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Calculate ... 
- 【PAT】1001. A+B Format (20)
		1001. A+B Format (20) Calculate a + b and output the sum in standard format -- that is, the digits m ... 
随机推荐
- UGUI学习笔记
			基本情况:熟悉NGUI 没接触过UGUI 目标:熟练掌握UGUI,并用在实际项目中 一 在网上寻找视频教程,快速了解UGUI http://www.taikr.com/course/89 不错的视频 ... 
- 运行CImg库笔记
			1. 在程序代码中加入 #include "CImg.h" using namespace cimg_library; 2. (1)Mac下 出现错误“无X11/Xlib.h”,: ... 
- asp 操作 json
			<% Dim sc4Json Sub InitScriptControl Set sc4Json =Server.CreateObject("MSScriptControl.Scrip ... 
- js添加div
			有这样一段div布局 <div class="clearfix"> <p class="left c"> <s ... 
- 小箭头的写法,z-index在ie7显示混乱问题
			一.jQuery 发布 1.9 正式版,最后支持 IE 6/7/8,2.0以上的版本都不支持这三个浏览器了. 二.小箭头的写法与旋转切换(一直以为这样的只以切图片,原来未必哦.) <style& ... 
- Raft协议详解-leader发送心跳代码go
			如果已经把最新的log更新了,那就多等一会,反之,很快就广播AppendEntries(也就是心跳消息) func (rf *Raft) LeaderState() { time.Sleep(10 * ... 
- 转载 Deep learning:一(基础知识_1)
			前言: 最近打算稍微系统的学习下deep learing的一些理论知识,打算采用Andrew Ng的网页教程UFLDL Tutorial,据说这个教程写得浅显易懂,也不太长.不过在这这之前还是复习下m ... 
- Windows API 之 GetModuleHandle
			Retrieves a module handle for the specified module. The module must have been loaded by the calling ... 
- WIN2003 设置 OPENVPN 服务端
			服务器端 安装openvpn 在这里http://swupdate.openvpn.org/community/releases/openvpn-install-2.3.4-I004-i686.exe ... 
- MySQL 不允许从远程访问的解决方法
			解决方法: 1. 改表法. 可能是你的帐号不允许从远程登陆,只能在localhost.这个时候只要在localhost的那台电脑,登入mysql后,更改 "mysql" 数据库里的 ... 
