当前位置:网站首页>2310. 个位数字为 K 的整数之和
2310. 个位数字为 K 的整数之和
2022-07-05 08:57:00 【紫菜(Nori)】
参考:
class Solution {
public:
int minimumNumbers(int num, int k) {
// 空多重集的和为 0
if(num == 0){
return 0;
}
// 参考官方题解
for(int i = 1; i <= 10; i++){
if(i * k <= num && (num - (i * k)) % 10 == 0){
return i;
}
}
return -1;
}
};边栏推荐
- 图解网络:什么是网关负载均衡协议GLBP?
- 【日常訓練--騰訊精選50】557. 反轉字符串中的單詞 III
- Chris LATTNER, the father of llvm: why should we rebuild AI infrastructure software
- Mengxin summary of LIS (longest ascending subsequence) topics
- 驾驶证体检医院(114---2 挂对应的医院司机体检)
- [牛客网刷题 Day4] JZ35 复杂链表的复制
- Halcon wood texture recognition
- scipy.misc.imread()
- Blue Bridge Cup provincial match simulation question 9 (MST)
- 混淆矩阵(Confusion Matrix)
猜你喜欢

Redis implements a high-performance full-text search engine -- redisearch

IT冷知识(更新ing~)

Understanding rotation matrix R from the perspective of base transformation

Blogger article navigation (classified, real-time update, permanent top)

Summary and Reflection on issues related to seq2seq, attention and transformer in hands-on deep learning

C#【必备技能篇】ConfigurationManager 类的使用(文件App.config的使用)

Add discount recharge and discount shadow ticket plug-ins to the resource realization applet
![C [essential skills] use of configurationmanager class (use of file app.config)](/img/8b/e56f87c2d0fbbb1251ec01b99204a1.png)
C [essential skills] use of configurationmanager class (use of file app.config)

牛顿迭代法(解非线性方程)
![3D reconstruction open source code summary [keep updated]](/img/ec/984aede7ef9e758abd52fb5ff4e144.jpg)
3D reconstruction open source code summary [keep updated]
随机推荐
kubeadm系列-00-overview
12. Dynamic link library, DLL
MPSoC QSPI flash upgrade method
[Niuke brush questions day4] jz55 depth of binary tree
Illustrated network: what is gateway load balancing protocol GLBP?
Return of missing persons
location search 属性获取登录用户名
Infix expression evaluation
My university
[daiy4] jz32 print binary tree from top to bottom
It cold knowledge (updating ing~)
Dynamic dimensions required for input: input, but no shapes were provided. Automatically overriding
Wechat H5 official account to get openid climbing account
Install the CPU version of tensorflow+cuda+cudnn (ultra detailed)
Characteristic Engineering
[technical school] spatial accuracy of binocular stereo vision system: accurate quantitative analysis
Redis implements a high-performance full-text search engine -- redisearch
Oracle advanced (III) detailed explanation of data dictionary
Digital analog 2: integer programming
Task failed task_ 1641530057069_ 0002_ m_ 000000