题目大意就是将前n个数字按顺序写在一起,然后统计这整个由数字组成的串中0-9各出现了几次。代码如下,比较容易理解。 ...
分类:
编程语言 时间:
2018-07-23 12:40:06
阅读次数:
169
数位dp姿势一直很差啊;顺便庆祝一下1A Description 给定两个正整数a和b,求在[a,b]中的所有整数中,每个数码(digit)各出现了多少次。 Input 输入文件中仅包含一行两个整数a、b,含义如上所述。 Output 输出文件中包含一行10个整数,分别表示0-9在[a,b]中出现了 ...
分类:
其他好文 时间:
2018-07-22 18:41:39
阅读次数:
119
A balanced number is a non-negative integer that can be balanced if a pivot is placed at some digit. More specifically, imagine each digit as a box wi ...
分类:
其他好文 时间:
2018-07-21 14:56:30
阅读次数:
122
一、正则表达式a、基本正则表达式元字符描述.匹配任意单个字符*匹配其前面的字符任意次.*任意长度的任意字符[]匹配指定范围内的任意单个字符[^]匹配指定范围外的任意单个字符[:lower:]小写字母[:upper:]大写字母[:alpha:]所有字母[:digit:]数字[:alnum:]所有数字和字母[:punct:]标点符号[:space:]空白字符\?匹配其前面的字符1次或0次{m,n}匹配
分类:
系统相关 时间:
2018-07-19 17:29:50
阅读次数:
207
#include<stdio.h> int main(){ char c; int letters=0,space=0,digit=0,other=0; printf("请输入一行字符:"); while ((c=getchar())!='\n') { if (c >= 'a'&&c <= 'z' ...
分类:
其他好文 时间:
2018-07-17 16:21:52
阅读次数:
202
Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. A mapping of digit to le ...
分类:
其他好文 时间:
2018-07-15 17:41:21
阅读次数:
322
1.关于number类型。 以下是从其文档中摘录出的一句话: p is the precision, or the total number of significant decimal digits, where the most significant digit is the left-mos ...
分类:
数据库 时间:
2018-07-12 13:26:01
阅读次数:
184
In the following, every capital letter represents some hexadecimal digit from 0 to f. The red-green-blue color "#AABBCC" can be written as "#ABC" in s ...
分类:
其他好文 时间:
2018-07-11 21:25:43
阅读次数:
223
判断语句: if .....elif.....else..... 如果....再如果.....否则..... 示例代码: 字符串的格式化输出: 示例代码: 常用的占位符:%s s = string %d d = digit 整数 %f f = float 浮点数,绝大多数就是表示小数 万恶的字符串拼 ...
分类:
编程语言 时间:
2018-07-08 10:44:47
阅读次数:
143
problem Given a non negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English. Input Sp ...
分类:
其他好文 时间:
2018-07-04 22:41:13
阅读次数:
141