还款(有误(未完成))

This commit is contained in:
James 2020-04-01 17:51:43 +08:00
parent 8b02d52112
commit a9e5279bc9
8 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,3 @@
# 标题
* 内容

View File

@ -0,0 +1,3 @@
# 标题
* 内容

Binary file not shown.

View File

@ -0,0 +1,6 @@
#include <iostream>
int main()
{
std::cout << "Hello Easy C++ project!" << std::endl;
}

BIN
4065_returnmoney/main.exe Normal file

Binary file not shown.

View File

@ -0,0 +1,23 @@
#include<iostream>
using namespace std;
long long n,k,m;
bool pan(long long now,long long x){
long long y=now/x;
if(y<x){
y=m;
}
now-=y;
}
long long dg(long long t,long long w) {
long long mid=(w-t)/2+t;
if(pan(n,mid)==1){
return dg(mid+1,w);
}else{
return dg(t,mid-1);
}
}
int main(){
cin>>n>>k>>m;
cout<<dg(1,n);
}

View File

View File

@ -0,0 +1,7 @@
## z:\Chao\src\Template\test\in.txt
2020/03/14 ÖÜÁù 11:41:28.68
Hello Easy C++ project!
-----------------------------------------------
Process exited after 200 ms with return value 0