跳到正文

个人记录

数字生成器

seanxlx约 6 分钟
原文
文章信息与版本

文章信息

发布
2024年3月20日
收录
2025年12月12日
更新
2026年10月11日
篇幅
约 6 分钟

版本

  1. v1当前
C++
#include<bits/stdc++.h>
#include<windows.h>
#include<conio.h>
using namespace std;
void SetPos(COORD a)// set cursor 
{
    HANDLE out=GetStdHandle(STD_OUTPUT_HANDLE);
    SetConsoleCursorPosition(out, a);
}

void SetPos(int i, int j)// set cursor
{
    COORD pos={short(i), short(j)};
    if(j < 0) SetPos({0, 39});
    else SetPos(pos);
}
int cmp(double i)
{
	return (int(pow(i, 1.6)) % 100) / 10;
}

int main()
{
	double i = 0;
	SetPos(0, 0);
	cout << "Give The Number Ordinal: ";
	cin >> i;
	SetPos(1, 0);
	while(i++ >= -1)
	{
		if(i > 410 && i < 500) Sleep(5);
		else if(i >= 1000);
		else Sleep(30);
		SetPos(0, 1);
		cout << "Ordinal[" << i << "]:" << endl;
		SetPos(0, 2);
		cout << "                                                ";
		SetPos(0, 2);
		if(i <= 20)
		{
			cout << i << endl;
		}
		else if(i <= 40)
		{
			cout << pow(3, log(i)) << endl;
		}
		else if(i <= 60)
		{
			cout << pow(3.5, log(i)) << endl;
		}
		else if(i <= 80)
		{
			cout << pow(i, 2) / 10 << endl;
		}
		else if(i <= 100)
		{
			cout << pow(i, 3) / 60 << endl;
		}
		else if(i <= 120)
		{
			cout << pow(i, 4) / 330 << endl;
		}
		else if(i <= 140)
		{
			cout << cmp(i) << "e" << int(sqrt(i * i * 0.3) / 1.5) << endl;
		}
		else if(i <= 160)
		{
			cout << cmp(i) << "e" << int(sqrt(i * i * sqrt(i) * 0.11) / 1.5) << endl;
		}
		else if(i <= 210)
		{
			cout << cmp(i) << "e" << int(pow(i * i * pow(i, 0.8) / 80, 0.6) / 2.14) << endl;
		}
		else if(i <= 280)
		{
			cout << "e" << int(pow(i, 2) / 100) << endl;
		}
		else if(i <= 400)
		{
			cout << "e" << int(pow(i, 2) / (100 - ((i - 280) / 1.2) + 1)) << endl;
			if(i >= 390) Sleep((i - 389));
		}
		else if(i <= 410)
		{
			cout << "e" << (pow(i, 2) * (1 + pow(i - 399, 2))) << endl;
			Sleep((i - 399) * 10);
		}
		else if(i <= 420)
		{
			cout << "ee" << i << endl;
		}
		else if(i <= 450)
		{
			cout << "F" << pow((i - 419), 2) << endl;
		}
		else if(i <= 489)
		{
			cout << "Fe" << (int)pow((i - 449), 1.5) << endl;
		}
		else if(i <= 499)
		{
			string num[10] = {"Fe1e15", "G10", "K9e15", "TREE(3)", "SSCG(3)", "Rayo(1e100)", "Rayo(1e1000)", "Rayo(Rayo(1e100))", "Rayo(Rayo(Rayo(1e100)))", "--- INFINITY ---"};
			cout << num[int(i - 490)] << endl;
			Sleep(pow(i - 489, 2) * 10);
		}
		else if(i == 500)
		{
			cout << "IN FI NI TY" << endl;
			Sleep(1000);
		}
		else if(i > 500)
		{
			string s = "";
			if(i >= 100500) s.append("(ω^ (ω^ (" + to_string(int((i - 500) / 1e5) % 10 + 1) + "))) + ");
			if(i >= 10500) s.append("(ω^ (" + to_string(int((i - 500) / 1e4) % 10 + 1) + "ω)) + ");
			if(i >= 1500) s.append("(ω^ (ω+" + to_string(int((i - 500) / 1000) % 10) + ")) + ");
			if(i >= 600 && i < 1000500) s.append("(ω^" + to_string(int((i - 500) / 100) % 10 + 1) + ") + ");
			if(i >= 510 && i < 100500) s.append("(" + to_string(int((i - 500) / 10) % 10) + "ω) + ");
			if(i < 10500) s.append("(ω+" + to_string(int(i - 500) % 10) + ")");
			cout << s << endl;
			if(i <= 600) Sleep(100);
			else if(i < 1500) Sleep(100 - (i - 600) / 9);
		}
	}
}
原文