#include <iostream>
#include <cstdlib>
#include <ctime>
#include <chrono>
using namespace std;
int main() {
int indicator =
std::chrono::system_clock::now().time_since_epoch().count() % 2;
if (indicator == 0)
cout << 1 << endl;
else
cout << 0 << endl;
return 0;
}
allenwhale 發表於 2014-8-4 14:49
我怎麼都不知道有後門???
這題其實有成功率極高的做法唷~
#include<iostream>
#include<ctime>
using namespace std;
int main()
{
cout<<clock()%2<<endl;
}
| 歡迎光臨 竹園論壇 (http://forum.tfcis.org/) | Powered by Discuz! X3.2 |