- 博客(4)
- 收藏
- 关注
转载 C++ explicit关键字
如果c++类的构造函数有一个参数,那么在编译的时候就会有一个缺省的转换操作:将该构造函数对应数据类型的数据转换为该类对象,如下面class class MyClass { public: MyClass( int num ); } MyClass obj = 10; //ok,convert int to MyClass 所示: 在上面的代码中编译器自动将整型转换为
2016-03-21 11:09:22
155
转载 HDU1443_Joseph
约瑟夫环。 AC之路, 其修远兮。 #include int main() { int num; int record[16] = {0}; //打个表,避免多次出现相同的输入且计算量过大 while ((scanf("%d", &num) != EOF) && num) { if (record[num] != 0) { printf("%d\n",
2016-01-31 19:00:16
275
原创 HDU_1060_leftmostdigt
题目: Problem Description Given a positive integer N, you should output the leftmost digit of N^N. Input The input contains several test cases. The first line of the input is a single
2016-01-27 09:40:42
191
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人