码迷,mamicode.com
首页 >  
搜索关键字:digits    ( 2164个结果
PAT 1120 Friend Numbers[简单]
Two integers are called "friend numbers" if they share the same sum of their digits, and the sum is their "friend ID". For example, 123 and 51 are fri ...
分类:其他好文   时间:2018-10-24 10:45:55    阅读次数:144
[leetcode]91. Decode Ways 解码方式
A message containing letters from A-Z is being encoded to numbers using the following mapping: Given a non-empty string containing only digits, determ ...
分类:其他好文   时间:2018-10-18 10:55:17    阅读次数:129
HDU - 5936: Difference(中途相遇法)
Little Ruins is playing a number game, first he chooses two positive integers yy and KK and calculates f(y,K)f(y,K), here f(y,K)=∑z in every digits of ...
分类:其他好文   时间:2018-10-17 00:21:39    阅读次数:237
[leetcode]258.Add Digits
题目 Given a non negative integer num, repeatedly add all its digits until the result has only one digit. Example: Input: 38 Output: 2 Explanation: The ...
分类:其他好文   时间:2018-10-15 11:47:13    阅读次数:131
The 2016 Asia Regional Contest, Tsukuba Quality of Check Digits Gym - 101158B
题意:某城市公民每个人有一个五位数的id,前四位是basic id,最后一位是校验位,校验位是根据样例给出的表格得到的,设某公民的id为abcde,那么e=((((0$a)$b)$c)$d),每个公民都可能犯错误,例如将一位数字写错或者将相邻的两位调换,于是我们优秀的表格是应该可以判断出错的情况的, ...
分类:其他好文   时间:2018-10-14 20:47:39    阅读次数:182
POJ2720 Last Digits
传送门 题目大意:求函数f(i) (f(0) = 1,f(x) = bf(x-1))的后7位。给定b和i。 这个要用到欧拉降幂公式。不过这个题其实比昨天的还要麻烦一些,昨天那个因为是无限的,所以每次指数肯定要大于φ(m),所以直接用就行啦。不过这个如果指数小于φ(m)的话,那么我们就得直接去取模。 ...
分类:其他好文   时间:2018-10-13 20:22:10    阅读次数:151
PAT-甲级-1001-A+B Format
Calculate a+b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less tha ...
分类:其他好文   时间:2018-10-12 01:21:55    阅读次数:174
[LeetCode] 738. Monotone Increasing Digits
Given a non-negative integer N, find the largest number that is less than or equal to N with monotone increasing digits. (Recall that an integer has m ...
分类:其他好文   时间:2018-10-11 23:44:51    阅读次数:216
Leetcode 66
//如何再vector头部插一个数class Solution { public: vector plusOne(vector& digits) { int n = digits.size(); int jinwei = 0; digits[n-1] += 1; if(digits[n-1] == ... ...
分类:其他好文   时间:2018-10-10 12:12:47    阅读次数:110
留出法、K折交叉验证、留一法进行数据集划分
fromsklearnimportdatasetsfromsklearnimportmodel_selection#引入sklearn库中手写数字的数据集digits=datasets.load_digits()#留出法X_train,X_test,y_train,y_test=model_selection.train_test_split(digits.data,digits.target,t
分类:其他好文   时间:2018-10-08 19:34:38    阅读次数:428
2164条   上一页 1 ... 35 36 37 38 39 ... 217 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!