码迷,mamicode.com
首页 >  
搜索关键字:shell while    ( 55956个结果
[000]求两个数的最大公约数
求出两个数的最大公约数 1 int foo(int v1, int v2) 2 { 3 while(v2) { 4 int temp = v2; 5 v2 = v1 % v2; 6 v1 = temp; 7 } 8 9 re...
分类:其他好文   时间:2014-04-30 04:42:13    阅读次数:404
HDU1720 A+B Coming (16进制加法)
16进制加法1 #include2 int main()3 {4 int a,b;5 while(scanf("%x %x",&a,&b)!=EOF)6 {7 printf("%d\n",a+b); 8 } 9 }
分类:其他好文   时间:2014-04-30 02:19:33    阅读次数:357
HDU1719 Friend (数学推导)
friend numbers = 2^x + 3^y -1 1 #include 2 int main() 3 { 4 __int64 a; 5 while(scanf("%I64d",&a)!=EOF) 6 { 7 if(!a) 8 { 9...
分类:其他好文   时间:2014-04-30 01:43:36    阅读次数:322
linux下shell脚本执行方法及exec和source命令
exec和source都属于bash内部命令(builtins commands),在bash下输入man exec或man source可以查看所有的内部命令信息。bash shell的命令分为两类:外部命令和内部命令。外部命令是通过系统调用或独立的程序实现的,如sed、awk等等。内部命令是由特...
分类:系统相关   时间:2014-04-30 00:23:34    阅读次数:671
hdu 1124
题意:求N!中末尾0的个数 其实就是5的个数 因为2*5=10 肯定n中2的个数比5的个数多#includeusing namespace std;int main(){ int n; int t,d; int sum; scanf("%d",&t); while(t...
分类:其他好文   时间:2014-04-29 21:09:41    阅读次数:346
hdu 1211
典型的快速幂成应用题意:求x 使得x^e%n=num#includeusing namespace std;bool funtion(int x,int e,int n,int num){// m^n % k int b = 1; while (e > 0) { i...
分类:其他好文   时间:2014-04-29 20:20:25    阅读次数:414
KMP算法中求next数组的实质
在串匹配模式中,KMP算法较蛮力法是高效的算法,我觉得其中最重要的一点就是求next数组:看了很多资料才弄明白求next数组是怎么求的,我发现我的忘性真的比记性大很多,每次看到KMP算法求next数组都得花很长时间去看怎么求,虽然看了很多遍了,但还是容易忘,所以我今天非得把它记下来,这样我下次看到的...
分类:其他好文   时间:2014-04-29 19:26:58    阅读次数:429
ubuntu查找命令比较
1. find find是最常见和最强大的查找命令,你可以用它找到任何你想找的文件。 find的使用格式如下: $ find - : 所要搜索的目录及其所有子目录。默认为当前目录。 - : 所要搜索的文件的特征。 - : 对搜索结果进行特定的处理。 如果什么参数也不加,find...
分类:其他好文   时间:2014-04-28 15:33:09    阅读次数:602
交互式shell和非交互式shell、登录shell和非登录shell的区别
交互式shell和非交互式shell、登录shell和非登录shell的区别。首先,这是两个不同的维度来划分的,一个是是否交互式,另一个是是否登录。交互式shell和非交互式shell(interactive shell and non-interactive shell)交互式模式就是在终端上执行...
分类:其他好文   时间:2014-04-28 00:05:33    阅读次数:210362
素数求和
#include using namespace std;int fun(int a){ if(a==1) return 0; for(int i=2;i>M; while(M--) { int i,sum=0; cout>N; ...
分类:其他好文   时间:2014-04-27 22:06:54    阅读次数:578
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!