当前位置:网站首页>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;
}
};边栏推荐
- Multiple linear regression (gradient descent method)
- Pytorch entry record
- [code practice] [stereo matching series] Classic ad census: (6) multi step parallax optimization
- [Niuke brush questions day4] jz55 depth of binary tree
- Configuration and startup of kubedm series-02-kubelet
- Blue Bridge Cup provincial match simulation question 9 (MST)
- Halcon blob analysis (ball.hdev)
- The combination of deep learning model and wet experiment is expected to be used for metabolic flux analysis
- [daily training] 1200 Minimum absolute difference
- Luo Gu p3177 tree coloring [deeply understand the cycle sequence of knapsack on tree]
猜你喜欢

什么是防火墙?防火墙基础知识讲解

Yolov4 target detection backbone

Beautiful soup parsing and extracting data

资源变现小程序添加折扣充值和折扣影票插件

混淆矩阵(Confusion Matrix)

It cold knowledge (updating ing~)

Install the CPU version of tensorflow+cuda+cudnn (ultra detailed)

C#【必备技能篇】ConfigurationManager 类的使用(文件App.config的使用)
![Introduction Guide to stereo vision (4): DLT direct linear transformation of camera calibration [recommended collection]](/img/ed/0483c529db2af5b16b18e43713d1d8.jpg)
Introduction Guide to stereo vision (4): DLT direct linear transformation of camera calibration [recommended collection]

Huber Loss
随机推荐
特征工程
Golang foundation - the time data inserted by golang into MySQL is inconsistent with the local time
Install the CPU version of tensorflow+cuda+cudnn (ultra detailed)
Rebuild my 3D world [open source] [serialization-2]
12、动态链接库,dll
Solution to the problems of the 17th Zhejiang University City College Program Design Competition (synchronized competition)
多元线性回归(梯度下降法)
uni-app 实现全局变量
[牛客网刷题 Day4] JZ55 二叉树的深度
[daiy4] copy of JZ35 complex linked list
Ros-11 common visualization tools
编辑器-vi、vim的使用
Pytorch entry record
Halcon color recognition_ fuses. hdev:classify fuses by color
ORACLE进阶(三)数据字典详解
Add discount recharge and discount shadow ticket plug-ins to the resource realization applet
ECMAScript6介绍及环境搭建
Programming implementation of ROS learning 5-client node
Array, date, string object method
MPSoC QSPI flash upgrade method