Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
100653 adar Cantor表 C++ Accepted 1 MS 272 KB 300 2024-12-09 20:09:02

Tests(10/10):


Code:

#include <bits/stdc++.h> using namespace std; int main() { int a=1,b=1,n,t=1; cin>>n; for(int i=2;i<=n;i++) { if(b%2!=0&&a==1) { b++; t=1; }else if(a%2==0&&b==1) { a++; t=-1; }else { a+=t; b-=t; } } cout<<a<<'/'<<b<<endl; return 0; }