Ai
1 Star 0 Fork 0

webturing/cplusplus

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
makeData.cpp 375 Bytes
一键复制 编辑 原始数据 按行查看 历史
计爱玲 提交于 2019-08-19 23:04 +08:00 . 求最小的数字拼接,排序规则是a+b<b+a
//
// Created by jal on 2019-06-03.
//
#include<bits/stdc++.h>
using namespace std;
int main(){
int t = 1;
for(int i = 1; i <= 10; i++){
ostringstream oss;
oss << i;
istringstream iss(oss.str());
string s;
iss >> s;
s = "data" + s + ".in";
ofstream cout(s);
cout << t << endl;
t *= 10;
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/webturing/cplusplus.git
git@gitee.com:webturing/cplusplus.git
webturing
cplusplus
cplusplus
master

搜索帮助