分享一下我老师大神的人工智能教程。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.youkuaiyun.com/jiangjunshow
http://acm.hdu.edu.cn/showproblem.php?pid=3782
XXX定律
- #include "iostream"
- using namespace std;
- int main()
- {
- int n;
- while (cin>>n&&n!=0)
- {
- int cnt=0;
- while(n!=1)
- {
- n=n%2?(n*3+1)>>1:n>>1;
- cnt++;
- }
- printf("%d\n",cnt);
- }
- }
ZOJ
- #include "iostream"
- #include "string"
- using namespace std;
- int main()
- {
- string str;
- while(cin>>str&&str!="E")

最低0.47元/天 解锁文章
5323

被折叠的 条评论
为什么被折叠?



