11.6 复合类型之一

发布于 2019-11-06  684 次阅读


短视频之所以能让人沉迷,就是因为它短,将所有内容以一种极具张力的形式表达出来。

-我自己说的

今天。。。晚上开始看书了。。。
用脑子上了2200分 一天上了400分 明天目标2400分

一开始是一些类型转换的东西 有个 static_cast<>() 后面会讲
还有个auto类型 话说这不就是用来搞竞赛的嘛。。。

。。。附一个狗粮N卡计算器 似乎有BUG 明天看看把它搞明白

//狗粮计算器
//完全是写着玩的。。。
//控制台版本
#include<algorithm>
#include<iostream>
#include<vector>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<string>
#include<ctime>
#include<map>
#include<stack>
#include<queue>
#include<set>
#include<cstring>
#include <unordered_set>
#include <bitset>
#include<unordered_map>
using namespace std;
typedef long long ll;


int main() {
	cout << "6X计算器☆★" << endl;
	cout << "该计算器是为了计算六一个式神所花费的N卡的数量" << endl;
	int initN, x_2, x_3, x_4, x_5;
	cout << "输入目标式神的星级\n";
	cin >> initN;
	if (initN == 6) {
		cout << "? 给爷爬" << endl;
		system("pause");
		return 0;
	}
	cout << "输入目前2X满级N卡的数量\n";
	cin >> x_2;
	cout << "输入目前3X满级白蛋的数量\n";
	cin >> x_3;
	cout << "输入目前4X满级白蛋的数量\n";
	cin >> x_4;
	cout << "输入目前5X白蛋的数量\n";
	cin >> x_5;
	cout << "结果计算中...\n";
	if (initN == 5) x_5++;
	else if (initN == 4) x_4++;
	else if (initN == 3) x_3++;
	else if (initN == 2) x_2++;
	int ansN = 240 - x_2 - 2 * x_3 - 2 * 4 * x_4 - 2 * 4 * 5 * x_5;
	cout << "需要N卡的数量为" << ansN << "个" << endl;
	system("pause");
	return 0;
}

愿风指引你的道路,愿你的刀刃永远锋利。