一、PTA实验作业 ==================== 题目1:使用函数输出水仙花数 1. 本题PTA提交列表 2. 设计思路 int narcissistic( int number )函数 1.定义整型变量int i,j,m; int n,digit=0,N1,N2; int num,re ...
分类:
编程语言 时间:
2017-11-19 02:16:41
阅读次数:
428
一、PTA实验作业 题目1:6 6 使用函数输出水仙花数 1.本题PTA提交列表 2. 设计思路 int narcissistic( int number ) //函数定义 1.定义整数型变量a.i分别来存放number分离的出来的数和进行digit次幂运算的循环次数 2.定义x=number,b= ...
分类:
编程语言 时间:
2017-11-18 23:33:59
阅读次数:
348
Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: ...
分类:
其他好文 时间:
2017-11-12 21:52:32
阅读次数:
181
Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telepho ...
分类:
其他好文 时间:
2017-11-10 18:42:03
阅读次数:
135
Absent-minded Masha got set of n cubes for her birthday. At each of 6 faces of each cube, there is exactly one digit from 0 to 9. Masha became interes ...
分类:
其他好文 时间:
2017-11-07 19:46:43
阅读次数:
189
打印人物信息的两种方法第一种: 第二种: 两种方法实现的结果都如下所示: 注:第二种方法是将人物信息进行格式化输入输出,更加方便。%s是占位符%s 字符串(string)%d 数字(digit)%f 小数(float) 所以上面的代码还可以这样写: ...
分类:
其他好文 时间:
2017-11-06 20:10:00
阅读次数:
125
FJ and his cows enjoy playing a mental game. They write down the numbers from 1 to N (1 <= N <= 10) in a certain order and then sum adjacent numbers t ...
分类:
其他好文 时间:
2017-11-05 12:14:43
阅读次数:
118
The Last Non-zero Digit Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 5363 Accepted: 1642 Description In this problem you will be given t ...
分类:
其他好文 时间:
2017-11-04 16:34:48
阅读次数:
153
##正则表达式基础命令 # //中加固定字符串匹配 # \p{ }中加属性名匹配带属性的字符 属性比如 空格=》space 数字=》digit # 元字符 如点号“.”可以匹配任意字符 反斜线“\”可以使点号失去特有意义,仅作点号使用 “()”也是元字符 # 量词 第一种 乘号“*”表示其前一个字符 ...
分类:
其他好文 时间:
2017-11-04 00:25:43
阅读次数:
198
You are given two non-empty linked lists representing two non-negative integers. The most significant digit comes first and each of their nodes contai ...
分类:
其他好文 时间:
2017-10-25 16:42:09
阅读次数:
97