当前位置:网站首页>Zzuli:1069 learn from classmate Z
Zzuli:1069 learn from classmate Z
2022-07-02 05:30:00 【Don't explode】
Title Description
Z In order to realize the dream of traveling to Yunnan in the summer vacation , Decide to spend only... Every day in the future 1 element , Every flower k Yuan, you can get 1 element , In limine Z Students have M element , Ask how many days you can last at most .
Input
Input 2 It's an integer M, k,(2 <= k <= M <= 1000).
Output
Output an integer , Express M The number of days that yuan can be consumed .
The sample input Copy
4 3
Sample output Copy
5
#include <stdio.h>
int main()
{
int t=0,n=0,M,k;
scanf("%d%d",&M,&k);
while(M!=0)
{
M-=1;
t++;
n++;
if(n%k==0)
M+=1;
}
printf("%d",t);
return 0;
}边栏推荐
- Importation de studio visuel
- With an amount of $50billion, amd completed the acquisition of Xilinx
- Visual Studio導入
- Nodejs (03) -- custom module
- 6.网络-基础
- Installation du tutoriel MySQL 8.0.22 par centos8
- Fabric.js IText设置指定文字的颜色和背景色
- Gee: create a new feature and set corresponding attributes
- 创新永不止步——nVisual网络可视化平台针对Excel导入的创新历程
- Gee: analyze the change of spatial centroid of remote sensing image [centroid acquisition analysis]
猜你喜欢

Fabric. JS right click menu

Fabric.js 右键菜单

Creation and destruction of function stack frames
![Gee: use of common mask functions in remote sensing image processing [updatemask]](/img/55/bf4ef5fc923242e72caab71f1a4e4b.jpg)
Gee: use of common mask functions in remote sensing image processing [updatemask]

MySQL foundation --- query (learn MySQL foundation in 1 day)

Straighten elements (with transition animation)

Fabric. JS upload local image to canvas background

【pyinstaller】_ get_ sysconfigdata_ name() missing 1 required positional argument: ‘check_ exists‘

6.网络-基础

青训营--数据库实操项目
随机推荐
Fabric. JS activation input box
Gee: explore the characteristics of precipitation change in the Yellow River Basin in the past 10 years [pixel by pixel analysis]
LS1046nfs挂载文件系统
Black Horse Notes - - set Series Collection
Global and Chinese market of impact roll 2022-2028: Research Report on technology, participants, trends, market size and share
Leetcode 18 problem [sum of four numbers] recursive solution
Gee: use of common mask functions in remote sensing image processing [updatemask]
Online music player app
Gee: create a new feature and set corresponding attributes
Gee series: Unit 3 raster remote sensing image band characteristics and rendering visualization
记录sentry的踩坑之路
Fabric.js 基础笔刷
Creation and destruction of function stack frames
Small and medium-sized projects to achieve certification and authorization of hand filter
Visual studio import
"Original, excellent and vulgar" in operation and maintenance work
Fabric.js 激活输入框
Importation de studio visuel
Usage record of vector
6. Network - Foundation