题目:输出特殊图案,请在c环境中运行,看一看,VeryBeautiful!for i in range(0,256): print('%c' % i),
分类:
编程语言 时间:
2014-09-12 17:05:24
阅读次数:
184
题目:输出9*9口诀。for i in range(1,10): for j in range(1,i+1): print str(j)+"*"+str(i)+"="+str(i*j) , print
分类:
编程语言 时间:
2014-09-12 17:05:13
阅读次数:
181
题目:用*号输出字母C的图案。print "***"print "*"print "*"print "***"
分类:
编程语言 时间:
2014-09-12 17:03:13
阅读次数:
178
1.开启block_dump,此时会把io信息输入到dmesg中echo1>/proc/sys/vm/block_dump统计当前占用IO最高的10个进程:dmesg|awk-F:‘{print$1}‘|sort|uniq-c|sort-rn|head-n102.测试完后,关闭block_dumpblock_dump参数echo0>/proc/sys/vm/block_dump
分类:
系统相关 时间:
2014-09-12 15:29:44
阅读次数:
299
#!/bin/bash
ip=`/sbin/ifconfig|grep"Bcast"|awk‘{print$2}‘|awk-F:‘{print$2}‘|head-n1`
cd/root/soft/memcached
#安装libevent
tarzxvflibevent-2.0.12-stable.tar.gz
cdlibevent-2.0.12-stable
./configure--prefix=/usr/local/libevent
make&&makeinstall
cd/root..
分类:
其他好文 时间:
2014-09-12 15:18:24
阅读次数:
176
思路:
沿着斜线打印即可。
public void print_rotate_matrix(int[] matrix , int n){
if(n=0 ; i--){
int j = i;
while((j+1)%n...
分类:
其他好文 时间:
2014-09-12 12:03:03
阅读次数:
203
#includeclass Fee{public: Fee(float dist,int min):m_dist(dist),m_min(min){} void Deal();private: float distBased(); float timeBased(); float m_dist; i...
分类:
其他好文 时间:
2014-09-12 11:45:03
阅读次数:
143
1. 基本语法 ? 1.1 变量类型、声明、赋值 ????? 变量弱类型,无需显式声明。 a?=?1
b?=?2
c?=?a?+?b
print?c ? 1.2 函数声明与调用 def?add(x,?y):
????z?=?x?+?y
????return?z ?...
分类:
编程语言 时间:
2014-09-12 01:21:13
阅读次数:
299
室友在做于是也做一发,跟已知两种遍历序列还原二叉树的思路类似,感觉PAT上的题目跟书本知识靠的近一些#include #include #include using namespace std;void print_data(const vector &as, const vector &ns) {...
分类:
其他好文 时间:
2014-09-12 01:11:52
阅读次数:
254
首先根据前序和中序构造一棵二叉树,然后利用中序遍历和广度优先将树按照形状打印出来。#include #include #include #define MAX 1000/*print the treefirst:using the preorder and inoder,create a treet...
分类:
其他好文 时间:
2014-09-11 22:07:52
阅读次数:
233