1 Star 0 Fork 1

saigon/Algorithms

forked from charlieshu/Algorithms 
Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
P1014 [NOIP1999 普及组] Cantor 表.cpp 305 Bytes
Copy Edit Raw Blame History
charlie authored 2024-01-09 00:01 . move from github to gitee
#include <iostream>
using namespace std;
int main(){
// while(true){
// cout<<endl<<endl;
int n;
cin>>n;
int sum=0;
int index=0;
while(sum < n){
index++;
sum += index;
}
sum -= index;
cout<<index-(n-sum)+1<<"/"<<n-sum;
// cout<<endl<<sum<<" "<<index;
// }
return 0;
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/saigonshu/algorithm.git
git@gitee.com:saigonshu/algorithm.git
saigonshu
algorithm
Algorithms
master

Search

0d507c66 1850385 C8b1a773 1850385