整数拆段(未完成)

This commit is contained in:
James 2020-05-01 18:43:50 +08:00
parent ef43e42fd4
commit 0b327c4df4
8 changed files with 45 additions and 0 deletions

16
1670_chaishu/Readme.md Normal file
View File

@ -0,0 +1,16 @@
# 1670 『入门』(递归专题)整数拆段
[问题描述]
  将一个位数为L4≤L≤10的自然数N拆成4段使各段对应的数的乘积最小。你能编一个程序实现吗
[输入格式]
  一个自然数N。
[输出格式]
  一个整数,最小乘积。
[输入样例]
321427
[输出样例]
2268

View File

@ -0,0 +1 @@
#

21
1670_chaishu/main.cpp Normal file
View File

@ -0,0 +1,21 @@
#include <iostream>
using namespace std;
int ans=0,nowans=1;
void xiao(int now,int duan){
if(duan==1){
if(ans==0||nowans<ans){
ans=nowans;
return ;
}
}else{
for(int i=10;;i*=10){
if(now)
}
}
}
int main()
{
int n;
cin>>n;
xiao(n,4);
}

BIN
1670_chaishu/main.exe Normal file

Binary file not shown.

0
1670_chaishu/test/in.txt Normal file
View File

View File

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