码迷,mamicode.com
首页 >  
搜索关键字:while read line for ifs    ( 74720个结果
P52
#include void fun(long s,long *t) { int d; long s1=1; *t=0; while(s>0) { d=s%10; if(d%2!=0) { *t=d*s1+*t;s1*=10; } s/=10; } } void main() { long s,t; printf("\nPlease enter s:"); ...
分类:其他好文   时间:2014-07-22 00:08:33    阅读次数:189
字符串截取
//$str 待截取的字符串//$len 截取的字符个数//$chars 已经截取的字符数//$res 保存的字符串//$chars 保存已经截取的字符串个数//$offset 截取的偏移量//$length 字符串的字节数//若$len>$str的字符个数,造成无谓的while循环,($off.....
分类:其他好文   时间:2014-07-22 00:00:36    阅读次数:220
POJ 2996 Help Me with the Game 模拟
Help Me with the Game Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 3344   Accepted: 2145 Description Your task is to read a picture of a chessboard positi...
分类:其他好文   时间:2014-07-21 23:38:44    阅读次数:265
450A - Jzzhu and Children 找规律也可以模拟
挺水的一道题,规律性很强,在数组中找出最大的数max,用max/m计算出倍数t,然后再把数组中的书都减去t*m,之后就把数组从后遍历找出第一个大于零的就行了 #include #include using namespace std; int main(){ // freopen("in.txt","r",stdin); int a[105],n,m; while(~sca...
分类:其他好文   时间:2014-07-21 23:29:23    阅读次数:312
P49
#include void fun(char *p,char *b) { int i,k=0; while(*p) { i=1; while(i<=3 && *p) { b[k]=*p; k++;p++;i++; } if(*p) { b[k++]=' '; } } b[k]='\0'; } void main() { char a[80],b...
分类:其他好文   时间:2014-07-21 23:29:22    阅读次数:235
c# int与byte[]转换
网络上总结的方法汇总: 1: public byte[] intToByte(int i) {         byte[] abyte0 = new byte[4];         abyte0[0] = (byte) (0xff & i);         abyte0[1] = (byte) ((0xff00 & i) >> 8);         aby...
分类:其他好文   时间:2014-07-21 23:29:20    阅读次数:367
hdu 1711 Number Sequence
直接套KMP模板 #include #include #include using namespace std; int s[1000005],w[10005],next[10005]; int b,c; void show() { int i,j; i=0; next[0]=-1; j=-1; while(i<c) { if(j=...
分类:其他好文   时间:2014-07-21 23:29:03    阅读次数:334
【Oracle】OGG error while loading shared libraries
[oracle@jp ogg]$ ./ggsci  ./ggsci: error while loading shared libraries: /u01/app/oracle/ogg/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied 关闭selinux,首先修改参数 [root@jp ...
分类:数据库   时间:2014-07-21 23:27:50    阅读次数:294
POJ3185 The Water Bowls 反转(开关)
Description The cows have a line of 20 water bowls from which they drink. The bowls can be either right-side-up (properly oriented to serve refreshing cool water) or upside-down (a position which h...
分类:其他好文   时间:2014-07-21 22:32:18    阅读次数:278
python打开外部应用
1、打开外部程序1.1os.system—>发送命令,让系统执行,没有返回值os.popen—>可执行系统命令,可以获取标准输出lll=os.popen(‘ls’)lll.read()os.popen2—>元组方式返回标准输入和标准输出stdin,stdou=os.popen2(‘sort’)s=‘’’ecdbe’’stdin.write(s)stdin.clo..
分类:编程语言   时间:2014-07-21 19:27:02    阅读次数:322
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!