码迷,mamicode.com
首页 >  
搜索关键字:while break continue    ( 40024个结果
Subversion detected an unsupported working copy version
关于这个错误:Subversion detected an unsupported working copy version while checking the status of 'XXXX'. Most likely you upgraded another Subversion client...
分类:其他好文   时间:2014-07-09 19:13:25    阅读次数:345
python知识点(07-08)
python: 循环else: while true: if x>1: print() break else: print() 文件循环: for line in open(‘test.txt’): print(line,end=’’) 获...
分类:编程语言   时间:2014-07-09 15:52:47    阅读次数:204
账户登录简版
static void Main(string[] args) { const string UN = "admin"; const string PW = "123456"; string usename, password; int i=0; while (i 3) { Console....
分类:其他好文   时间:2014-07-09 13:42:30    阅读次数:172
HDU 4847 陕西邀请赛A(水)
HDU 4847 Wow! Such Doge! 题目链接 题意:给定文本,求有几个doge,不区分大小写 思路:水题,直接一个个读字符每次判断即可 代码: #include #include char c; char a[5]; int main() { a[5] = '\0'; int ans = 0; while ((c = ge...
分类:其他好文   时间:2014-07-09 12:15:23    阅读次数:220
2013 通化邀请赛ABCDEGHIJ题解
A: #include #include int main() { int T; scanf("%d", &T); while(T --) { double x, ans = 0; for(int i = 0; i < 12;i ++) { scanf("%lf", &x); ans += x; } ans /= 12; char b[1000]; ...
分类:其他好文   时间:2014-07-09 11:05:46    阅读次数:277
文件00
00编写一个程序,接受用户的输入并保存为新的文件:def file_write(file_name): f = open(file_name, 'w') print('请输入内容【单独输入\':w\'保存退出】:') while True: write_some ...
分类:其他好文   时间:2014-07-08 22:10:19    阅读次数:353
【剑指offer】Q16:翻转链表
def reverse(head): if head == None or head.next == None: return head psuhead = ListNode(-1) while head: nexthead = head.next head.next = psuhead.next psuhead.next = head head = nexthead ...
分类:其他好文   时间:2014-07-08 15:27:58    阅读次数:183
【剑指offer】Q14:调整数组顺序使奇数位于偶数前面
def isOdd(n): return n & 1 def Reorder(data, cf = isOdd): odd = 0 even = len( data ) - 1 while True: while not isOdd( data[ even ]) : even -= 1 while isOdd( data[ odd ]) : odd += 1 if odd ...
分类:其他好文   时间:2014-07-08 12:47:26    阅读次数:276
UVa 729 - The Hamming Distance Problem
题目:构造n位01串,其中有m个1的所有组合。 分析:搜索、枚举。可以利用库函数,求解,也可以利用dfs求解;我这里采用位运算计算组合数。 说明:注意库啊! #include #include #include using namespace std; int S[20]; int main() { int T,N,M; while ( cin >> T ) for ( i...
分类:其他好文   时间:2014-07-08 11:24:33    阅读次数:199
建立单链表的方法
#include<iostream> usingnamespacestd; structnode{ intd; structnode*next; };//定义结点 node*build1()//头插法构造单链表 { node*p;//指向新建结点 node*head;//头指针 head=NULL; p=head; intx; cin>>x; while(x!=-1) { p=newnode; p->d=x; p-&g..
分类:其他好文   时间:2014-07-08 09:06:06    阅读次数:220
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!