- gf24153 的博客
《Mod笔谈特别篇:考古队在20314年发现了这篇blog》
- @ 2025-9-2 13:03:01
702林哲宸学弟的恩情还不完啊orz
顺便回一句,本土豆地雷非常认可学弟!
#include <bits/stdc++.h>
#include <windows.h>
#define DO 262//供人参考,可以用这些写歌!
#define RE 294
#define MI 330
#define FA 349
#define SOL 392
#define LA 440
#define SI 494
#define DHL 401
using namespace std;
int main() {
Beep(401/*赫兹*/,1000/*毫秒数*/);cout<<"。";
return 0;
}
想到同学过生日,给同学的赛博蛋糕Python版
print("多少人吃蛋糕")
a = int(input())
print("分")
print(1/a)
print("份每人")
print("🎂")
好玩的游戏
//赌徒狂欢1.9
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
namespace dj {
bool axj(long long key) {
return (GetKeyState(key) < 0) ? (true) : (false);
}
struct hl {
long long h,l;
};
void de(int x) {
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),x);
}
bool ax(long long key) {
return (GetKeyState(key) < 0) ? (true) : (false);
}
hl wz(bool x = 1, bool n = 1) {
HANDLE hOutput = GetStdHandle(STD_OUTPUT_HANDLE);
HWND h = GetForegroundWindow();
CONSOLE_FONT_INFO consoleCurrentFont;
hl hl;
POINT p;
if (x) {
GetCursorPos(&p);
ScreenToClient(h, &p);
} else {
GetCursorPos(&p);
}
if (n) {
GetCurrentConsoleFont(hOutput, FALSE, &consoleCurrentFont);
p.x /= consoleCurrentFont.dwFontSize.X;
p.y /= consoleCurrentFont.dwFontSize.Y;
}
hl.h = p.y + 1;
hl.l = p.x + 1;
return hl;
}
void ycbj() {
HANDLE hStdin = GetStdHandle(STD_INPUT_HANDLE);
DWORD mode;
GetConsoleMode(hStdin, &mode);
mode &= ~ENABLE_QUICK_EDIT_MODE;
SetConsoleMode(hStdin, mode);
return;
}
void ycgb() {
CONSOLE_CURSOR_INFO cursor;
cursor.bVisible = FALSE;
cursor.dwSize = sizeof(cursor);
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorInfo(handle, &cursor);
return;
}
inline void ydgb(long long h, long long l) {
COORD pos = { l - 1,h - 1 };
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorPosition(hOut, pos);
return;
}
bool pdbj(int y,int x,int x1,int x2,int ys,string zt) {
ycgb();
ycbj();
hl z=wz(1,1);
bool a=0;
if(z.h==y&&z.l>=x1&&z.l<=x2) {
ydgb(y,x);
de(ys*16);
cout<<zt;
de(ys);
if(axj(VK_LBUTTON)) {
a=1;
}
} else {
ydgb(y,x);
de(ys);
cout<<zt;
}
de(15);
return a;
}
};
using namespace dj;//一定要有
long long f=200;
int a,b,ans,k,x,water;
bool blog=1;
bool developerMode = false; // 开发者模式开关
string devPassword = "mod2025"; // 开发者密码
void developerMenu() {
system("cls");
cout << "=== 开发者模式 ===" << endl;
cout << "当前余额: " << f << endl;
cout << "圣水数量: " << water << endl;
cout << "开发者模式: " << (developerMode ? "开启" : "关闭") << endl;
cout << "==================" << endl;
while(1) {
if(pdbj(2,1,1,20,10,"设置余额")) {
system("cls");
cout << "请输入新的余额: ";
long long newBalance;
cin >> newBalance;
f = newBalance;
cout << "余额已设置为: " << f << endl;
Sleep(1000);
system("cls");
developerMenu();
return;
}
if(pdbj(3,1,1,20,10,"添加圣水")) {
water++;
cout << "圣水+1,当前数量: " << water << endl;
Sleep(1000);
system("cls");
developerMenu();
return;
}
if(pdbj(4,1,1,20,10,"直接获胜")) {
f = 100000000;
cout << "已设置为亿万富翁!" << endl;
Sleep(1000);
system("cls");
developerMenu();
return;
}
if(pdbj(5,1,1,15,10,"返回主菜单")) {
system("cls");
return;
}
if(pdbj(6,1,1,20,10,"关闭开发者模式")) {
developerMode = false;
cout << "开发者模式已关闭" << endl;
Sleep(1000);
system("cls");
return;
}
}
}
void gs(string x) {
int a=x.size();
for(int i=0; i<=a; ++i) {
Sleep(100);
cout<<x[i];
}
}
void gg() {
system("cls");
for(int i=0; i<=20; i++) {
//cout<<30-i<<"s";
if(i==0) {
gs(" Mod牌笔记");
cout<<endl;
}
if(i==1) {
gs(" 学习好助手,你值得拥有");
cout<<endl;
}
if(i==2) {
gs(" __ ___________");
cout<<endl;
}
if(i==3) {
gs(" || | M |");
cout<<endl;
}
if(i==4) {
gs(" || | o |");
cout<<endl;
}
if(i==5) {
gs(" || | d |");
cout<<endl;
}
if(i==6) {
gs(" || | 牌 |");
cout<<endl;
}
if(i==7) {
gs(" || | 笔 |");
cout<<endl;
}
if(i==8) {
gs(" \\\b\\/ | 记 |");
cout<<endl;
}
if(i==9) {
gs(" |_________|");
cout<<endl;
}
if(i==10) {
cout<<endl;
}
if(i==11) {
cout<<endl;
}
if(i==12) {
cout<<endl;
}
if(i==13) {
gs("如有需要,请拨打445-2753-1756。");
}
if(i>13) {
Sleep(1000);
}
//system("cls");
}
cout<<"获得15块"<<endl;
f+=15;
Sleep(200);
system("cls");
return ;
}
void cp() {
system("cls");
f-=3;
for(int i=1; i<=6; i++) {
cout<<"0-30选一个数,作为你的彩票编码第"<<i<<"位"<<endl;
cin>>a;
b=rand()%30+1;//概率可调
if(a==b)ans*=100;
else {
if(ans==1) {
cout<<"你得到了0元"<<endl;
} else {
cout<<"你得到了"<<ans<<"元"<<endl;
f+=ans;
}
Sleep(500);
system("cls");
break;
}
}
}
void tiger() {
f-=15;
ans=1;
system("cls");
cout<<" 点击抽奖"<<endl;
while(!pdbj(2,7,1,16,11,"按下吧")) {
}
system("cls");
int c,d,e;
c=rand()%30+1;//概率可调
d=rand()%30+1;//概率可调
e=rand()%30+1;//概率可调
cout<<endl;
cout<<"|"<<c<<"|"<<d<<"|"<<e<<"|"<<endl;
if(c==d) {
ans*=10*e/2;
if(d==e) {
ans*=100*e;
cout<<"大奖!";
Sleep(500);
}
} else {
if(d==e)ans*=e/2;
}
if(d==c+1&&e==d+1) {
ans*=1000;
cout<<"顺子";
}
if(d==c-1&&e==d-1) {
ans*=900;
cout<<"反顺子";
}
Sleep(500);
if(ans==1) {
cout<<"你得了0元"<<endl;
} else {
cout<<"你得了"<<ans<<"元"<<endl;
f+=ans;
ans=1;
}
Sleep(1000);
system("cls");
}
void winer() {
system("cls");
f-=200;
cout<<"你好,要点什么?"<<endl;
cout<<"当前余额:"<<f<<endl;
while(1) {
if(pdbj(3,1,1,50,5,"黄金酒,500元,可以将购买后你的总额翻十倍;")) {
system("cls");
f-=500;
f*=10;
cout<<"金子!金子!";
break;
}
if(pdbj(4,1,1,50,5,"生死酒,50%的概率死亡,50%的概率将总额翻10000倍")) {
system("cls");
int ed=rand()%2+1;
if(ed==1) {
if(water) {
water-=1;
cout<<"神明庇护了你";
break;
} else {
cout<<"你死了"<<endl;
cout<<"达成结局3:死亡";
Sleep(1000);
exit(0);
}
} else {
cout<<"恭喜你,活下来了";
f*=10000;
Sleep(500);
break;
}
}
if(pdbj(5,1,1,50,5,"圣水,200元,可以免疫一次死亡;")) {
system("cls");
f-=200;
water++;
cout<<"神明会庇佑你";
break;
}
if(pdbj(6,1,1,50,5,"可口可乐,20元,可以获得1-500元不等的人民币")) {
system("cls");
f-=20;
int ed=rand()%500+1;
cout<<"瓶盖上显示你得了"<<ed<<"元"<<endl;
f+=ed;
break;
}
}
Sleep(1000);
system("cls");
return ;
}
void renlian() {
cout<<" --------"<<endl;
cout<<" (^-^)"<<endl;
cout<<" \\\b\\/[ ]"<<endl;
cout<<"============================================================"<<endl;
}
void lunpandu() {
renlian();
gs("你好,我叫Bob,你也是来参加轮盘赌的吧");
system("cls");
renlian();
gs("规则就是在你回合,可以选择用枪打谁");
system("cls");
renlian();
gs("如果射向自己,并且是空弹,那么你可以在打一次");
system("cls");
renlian();
gs("如果射向对手,那么无论是不是空弹,都将把回合给到我");
system("cls");
renlian();
gs("那么,开始吧!");
system("cls");
renlian();
Sleep(500);
system("cls");
}
void shezhi() {
system("cls");
Sleep(100);
while(1) {
if(pdbj(1,1,1,8,7,"关于游戏")) {
Sleep(100);
system("cls");
gs("本游戏由Mod笔谈出品");
cout<<endl;
gs(" 参与者");
cout<<endl;
gs(" 技术扶持:林培奇");
cout<<endl;
gs(" 技术扶持:黄嘉赢");
cout<<endl;
gs(" 界面设计:莫晗");
cout<<endl;
gs(" 技术实现:莫晗");
cout<<endl;
gs(" 灵感来源:G币人生");
cout<<endl;
gs("https://www.bcoi.cn/d/gfhd/blog/252/");
cout<<endl;
gs(" 灵感来源2:赌神模拟器");
cout<<endl;
gs("https://www.bcoi.cn/d/gfhd/blog/507/68cdf84a445b45c7920cde55#1758328906825");
cout<<endl;
gs(" 出版:Mod笔谈");
cout<<endl;
gs("正版渠道:https://www.bcoi.cn/blog/246/68b67a8535f6ac3821de3868#1756789381892");
Sleep(3000);
system("cls");
continue;
}
if(pdbj(2,1,1,6,7,"版本号")) {
Sleep(100);
system("cls");
cout<<"版本:赌徒狂欢1.0.9"<<endl;
Sleep(5000);
if(blog) {
cout<<"余额+200元";
f+=200;
blog=0;
}
system("cls");
continue;
}
if(pdbj(3,1,1,8,7,"退出")) {
Sleep(100);
system("cls");
return ;
}
if(pdbj(4,1,1,1,7,"")) {
Sleep(100);
system("cls");
if(!developerMode) {
cout << "请输入开发者密码: ";
string inputPwd;
cin >> inputPwd;
if(inputPwd == devPassword) {
developerMode = true;
cout << "开发者模式已开启!" << endl;
} else {
cout << "密码错误!" << endl;
}
} else {
system("cls");
developerMenu();
}
Sleep(1000);
system("cls");
continue;
}
}
}
int main() {
int zslsd=1;
while(1) {
ydgb(1,1);
if(zslsd==1) {
gs("欢迎来到赌徒狂欢");
cout<<endl;
gs("初始金额200元");
cout<<endl;
gs("无尽模式开启啦");
cout<<endl;
}
if(pdbj(4,1,1,8,7,"算鸟算鸟")) {
Sleep(100);
system("cls");
Sleep(100);
while(f>0) {
if(f>=100000000) {
cout<<"恭喜你通关本游戏"<<endl;
cout<<"感谢游玩"<<endl;
cout<<"达成结局1:亿万富翁";
Sleep(1000);
exit(0);
}
if(pdbj(1,1,1,16,7,"3元一次的彩票")) {
system("cls");
Sleep(500);
cp();
}
if(pdbj(2,1,1,6,7,"看广告")) {
system("cls");
Sleep(500);
gg();
}
if(pdbj(3,1,1,20,7,"15元一次,玩老虎机")) {
system("cls");
Sleep(500);
tiger();
}
if(pdbj(4,1,1,20,7,"200元,进入酒吧")) {
system("cls");
Sleep(500);
winer();
system("cls");
}
if(pdbj(5,1,1,4,7,"设置")) {
shezhi();
Sleep(500);
system("cls");
}
/*
if(pdbj(6,1,1,22,7,"紧张刺激的俄罗斯轮盘赌")) {
system("cls");
Sleep(500);
lunpandu();
}*/
cout<<endl;
cout<<"存款:"<<f<<endl;
}
cout<<"你破产了,记得下载反诈APP"<<endl;
cout<<"达成结局2:破产";
return 0;
}
if(pdbj(5,1,1,8,7,"游玩一下")) {
system("cls");
Sleep(100);
while(f>0) {
if(pdbj(1,1,1,16,7,"3元一次的彩票")) {
system("cls");
Sleep(500);
cp();
}
if(pdbj(2,1,1,6,7,"看广告")) {
system("cls");
Sleep(500);
gg();
}
if(pdbj(3,1,1,20,7,"15元一次,玩老虎机")) {
system("cls");
Sleep(500);
tiger();
}
if(pdbj(4,1,1,20,7,"200元,进入酒吧")) {
system("cls");
Sleep(500);
winer();
system("cls");
}
if(pdbj(5,1,1,4,7,"设置")) {
shezhi();
Sleep(500);
system("cls");
}
/*
if(pdbj(6,1,1,22,7,"紧张刺激的俄罗斯轮盘赌")) {
system("cls");
Sleep(500);
lunpandu();
}
*/
cout<<endl;
cout<<"存款:"<<f<<endl;
}
cout<<"你破产了,记得下载反诈APP"<<endl;
cout<<"达成结局2:破产";
return 0;
}
zslsd=2;
}
}
下面是一种养成类小游戏
#include<iostream>//wenjing game
#include<windows.h>
using namespace std;
int ming=1,ton=90,li=5,food=3,water=1;
void fly(int l,int t){
system("cls");
if(l<2*t)cout<<"飞不起来了"<<endl;
else{
int fei=rand()%l+1;
if(fei!=1){
cout<<"飞起来了"<<endl;
if(rand()%2+1==1){
cout<<"飞走了~~~"<<endl;
exit(0);
} else{
cout<<"不~,坠鸡了"<<endl;
}
}
}
}
void eat(){
system("cls");
int ed=rand()%10+1;
if(ed==5){
cout<<"才刚吃饱"<<endl;
food++;
}else{
if(ed==9){
cout<<"吃撑了"<<endl;
ton+=10;
food+=10;
li++;
}else{
cout<<"吃饱了"<<endl;
food+=3;
ton+=1;
li+=10;
}
}
Sleep(1000);
}
void drink(){
int ed=rand()%10+1;
water+=ed;
}
void lian(int t){
int ed=rand()%10+1;
if(ed==1){
cout<<"竟然累死了"<<endl;
ming-=1;
exit(0);
}else{
cout<<"健康每一天"<<endl;
ton-=10;
li+=10;
}
}
int main(){
cout<<"here is a chicken,his name is 应激!"<<endl;
while(ming>0){
cout<<"你想喂它吗(用bool值,1:喂,0:不喂)"<<endl;
int wen;
cin>>wen;
if(wen==1){
eat();
}else{
cout<<"鸡鸡有点饿"<<endl;
food-=1;
ton-=10;
}
cout<<"想喝口水吗(1:喝,0:喝你个俄罗斯大贝塔)" <<endl;
cin>>wen;
if(wen==1){
drink();
}else{
water-=1;
}
cout<<"带出去练练不?1:好,0:不)"<<endl;
cin>>wen;
if(wen==1){
lian(ton);
}
if(food<=0){
cout<<"饿爆了"<<endl;
ming-=1;
}
if(water<=0){
cout<<"渴爆了"<<endl;
ming-=1;
}
cout<<"飞不飞(1:飞,2:飞个蛋)"<<endl;
cin>>wen;
if(wen==1){
fly(li,ton);
}
cout<<"一肘"<<li<<"斤"<<endl;
cout<<"重"<<ton<<"00g";
Sleep(1000);
system("cls");
}
cout<<"wenjing is death"<<endl;
return 0;
}
写字小程序python版
import turtle
a=input("输入你想要的汉字")
def write_text():
t = turtle.Turtle()
t.penup()
t.goto(0, -50)
t.color('black')
t.write(a, align="center", font=("Arial", 24, "bold"))
t.hideturtle()
screen = turtle.Screen()
screen.bgcolor('white')
write_text()
screen.mainloop()
RFID技术实现(信息课学的)
from unihiker_k10 import screen
from machine import Pin
from pn7150 import rfid
import time
rfid = rfid(sda=Pin(47),scl=Pin(48))
screen.init(dir==2)
screen.show_bg(color=0xFFFFFF)
screen.show_draw()
name_lab = {"54d065e6": "张三","16292f4e":"李四"}
while True:
card = rfid.scanning(wait=False)
if card:
screen.clear()
uid = card.read_uid()
screen.draw_text(text=name_lab[uid], x=60, y=60.color=0x000000, )
if uid in name_lab:
screen.draw_text(text=name_lab[uid], x=60, y=60,color=0x000000, )
screen.show_draw()
else:
screen.clear()
time.sleep(2)
竞赛需要学的东东
#include<iostream>
using namespace std;
int main(){
freopen("文件名.in","r",stdin);
freopen("文件名.out","w",stdout);//文件读写
ios::sync_with_stdio(false);
cin.tie(0); cout.tie(0);
return 0;
}
输出只因你太美的代码
一、C++版本
#include<iostream>
using namespace std;
int a;
int main(){
cin>>a
二、Python版本
a=int(input())
for i in range(1,a):
print("只因你太美")
mod
#include<iostream>
#include<windows.h>
using namespace std;
int n,m;
char rand(int d){
if(d==1){
cout<<'.';
}
if(d==2){
cout<<'*';
}
if(d==3){
cout<<'!';
}
}
int main(){
srand(time(0));
cout<<"mod好用的DFS数据生成器"<<endl;
cin>>n>>m;
for(int i=1;i<=n;i++){
for(int j=1;j<=m;j++){
fad(rand()%3+1);
}
cout<<endl;
}
}