我自己測幾乎都沒有錯
但是系統在側都有2到3個錯
可否有人幫忙解惑?
#include<iostream>
using namespace std;
int main()
{
int h,m;
while(cin>>h>>m)
{
if(h==7&&m<=29)
cout<<"Off School\n";
else if(h==7&&m>=30)
cout<<"At School\n";
else if(h>=17)
cout<<"Off School\n";
else if(8<=h<=16)
cout<<"At School\n";
}
return 0;
}
我自己測幾乎都沒有錯
但是系統在側都有2到3個錯
可否有人幫忙解惑?
#include
using namespace std;
int main()
{
int h,m;
while(cin>>h>>m)
{
if(h==7&&m<=29)
cout<<"Off School\n";
else if(h==7&&m>=30)
cout<<"At School\n";
else if(h>=17)
cout<<"Off School\n";
else if(8<=h<=16)
cout<<"At School\n";
}
return 0;
}
我自己測幾乎都沒有錯
但是系統在側都有2到3個錯
可否有人幫忙解惑?
#include
using namespace std;
int main()
{
int h,m;
while(cin>>h>>m)
{
if(h==7&&m<=29)
cout<<"Off School\n";
else if(h==7&&m>=30)
cout<<"At School\n";
else if(h>=17)
cout<<"Off School\n";
else if(8<=h<=16)
cout<<"At School\n";
}
return 0;
}
可以用個更簡單的
#include <iostream>
using namespace std;
int main(){
cout << "Off School ";
cout << "At School ";
cout << "At School ";
cout << "At School ";
cout << "At School ";
cout << "At School ";
cout << "At School ";
cout << "Off School ";
cout << "Off School ";
cout << "Off School ";
}
直接把測試組的答案抓下來?
我自己測幾乎都沒有錯
但是系統在側都有2到3個錯
可否有人幫忙解惑?
#include
using namespace std;
int main()
{
int h,m;
while(cin>>h>>m)
{
if(h==7&&m<=29)
cout<<"Off School\n";
else if(h==7&&m>=30)
cout<<"At School\n";
else if(h>=17)
cout<<"Off School\n";
else if(8<=h<=16)
cout<<"At School\n";
}
return 0;
}
可以用個更簡單的
#include
using namespace std;
int main(){
cout << "Off School ";
cout << "At School ";
cout << "At School ";
cout << "At School ";
cout << "At School ";
cout << "At School ";
cout << "At School ";
cout << "Off School ";
cout << "Off School ";
cout << "Off School ";
}
直接把測試組的答案抓下來?
照我看來就是繼續NA 沒一個換行的
乾脆寫個rand跑答案算了?