原题 一开始楼主傻BB直接求解,思路惨不忍睹,各种循环啊有木有?还写了个计算是否整除扩展方法以为重复复用很了不起啊(其实是傻...)二逼青年的代码1#regionso12int[]count=newint[100];3string[]s4=newstring[]{"Fizz","Buzz","Whi...
分类:
其他好文 时间:
2014-05-05 11:22:14
阅读次数:
271
#include #ifdef __cplusplusextern "C"
{#endif#include #include //#include #ifdef _MSC_VERint strcasecmp(const char
*s1, const char *s2){ while ((*s...
分类:
其他好文 时间:
2014-05-05 11:09:37
阅读次数:
382
这本书要想买到,在大陆看起来比较难,理出个目录,看个大概:另外在这个地方可以预览前20页:http://openebook.hyread.com.tw/ebookservice/hyviewer/online_browser.do
1 個人電腦架構概述(第11頁)1-1 名詞解釋(第12頁)1-2 ...
分类:
编程语言 时间:
2014-05-04 20:47:09
阅读次数:
443
行编辑程序、括号匹配检验程序都是利用的栈的数据结构。而这两个
小程序也非常好的显示了栈先进后出的思想。由于程序本身很简短、清晰,所
以也就不做多的解释了,直接上代码了。
行编辑程序:
#include
#include
using namespace std;
int main()
{
stack sta;
char ch = getchar();
while(ch!=EOF)
...
分类:
其他好文 时间:
2014-05-04 18:55:11
阅读次数:
423
#include
#include
int main()
{
double k,m;
int T;
scanf("%d",&T);
while(T--)
{
scanf("%lf%lf",&k,&m);
int a=pow(10,log10(m)/k);
while(pow(a+1,k)<=m)
++a;
printf("%d\n",a);
}
return 0;
}...
分类:
其他好文 时间:
2014-05-04 18:44:58
阅读次数:
296
After a long and successful day of preparing food for the banquet, it is time to clean up. There is a list of n jobs to do before the kitchen can be closed for the night. These jobs are indexed from 1...
分类:
其他好文 时间:
2014-05-04 18:25:07
阅读次数:
384
严重: Exception loading sessions from persistent storage
java.io.EOFException
删除Tomcat里面的work/Catalina/localhost下的内容即可解决
Tomcat在启动时出现如下异常问题:
严重: IOException while loading persisted sessions...
分类:
其他好文 时间:
2014-05-04 17:58:54
阅读次数:
313
题目:
输入一个已经按升序排序过的数组和一个数字,在数组中查找两个数,使得它们的和正好是输入的那个数字。要求时间复杂度是O(n)。如果有多对数字的和等于输入的数字,输出任意一对即可。
例如输入数组1、2、4、7、11、15和数字15。由于4+11=15,因此输出4和11。
思路:
最直接的做法是暴力法,两个for循环,时间复杂度为O(n*n),但是这样没有充分利用升序数组这一前提。我们假设数组为A,长度为len,给定的和为sum,最好的方法是先用数组的第一个数A[lo...
分类:
其他好文 时间:
2014-05-04 17:56:57
阅读次数:
596
So many days passed since the last C tutorial about the flowchart, this chapter we will go on the flowchart and while loops...
分类:
其他好文 时间:
2014-05-04 09:01:20
阅读次数:
307
入门
编程语言是一些符号,用来为人和机器描述计算或者计算指令,我们所熟悉的计算机世界,他完全依赖于编程语言,因为所有的运行在计算机中的软件都是由某些编程语言开发的,但是,一个程序可以运行之前,它必须要翻译成某种形式,使得计算机能够执行它。
The software systems that do this translated are called compilers(由称作编译器的软件系统来...
分类:
其他好文 时间:
2014-05-04 08:52:08
阅读次数:
380