最大公约数。不喜欢欧几里得算法
欧几里得算法难以理解。在课上闲着无聊,翻书的时候看到用欧几里得算法求最大公约数,然后就想到为什么不用暴力穷举?用了指针,函数,for循环,if,break。指针其实并没有起多大作用,但因为我在学指针,所以刚好用了。在写代码的时候,初版有很多问题。 12int i;for(int i=(a>b)?a:b;a>=1;i--) i被int了两次! 12#include<stdio.h>int transii(int a,int b); 没有提前申明函数 12 for(i=(a>b)?a:b;i>=1;i=i-1) \\(a>b)?a:b应该改成如下(a<b)?a:b 冗余问题啊。 接下来出示成品123456789101112131415161718192021222324252627282930313233343536373839#include<stdio.h>int transii(int a,int b);int main(void){ int a=0,b=0,c=...
福州理工图书馆的初体验
因为宿舍太吵所以我选择去图书馆逛逛,然后我发现图书馆也不是人可以待的。 首先是特别热,谁懂我跋山涉水从宿舍楼走到图书馆,发现图书馆没空调的感受,汗水把俺的衣服彻底黏在背上,恭喜我澡又白洗了 其次是网络特别差,下载一个东西要三万年。虽然在宿舍网络也是时好时坏的,但是图书馆网络问题更加严重。我好不容易打开网站,想着去下载软件然后开始工作,结果就看到一个超级雷霆的下载速度,下载一个150mb的软件需要40分钟。 所以我彻底失去所有的力气和手段 杰顿镇楼,毁灭世界 PS:前台学姐的态度其实挺好的
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick StartCreate a new post1$ hexo new "My New Post" More info: Writing Run server1$ hexo server More info: Server Generate static files1$ hexo generate More info: Generating Deploy to remote sites1$ hexo deploy More info: Deployment