命中注定

· · 个人记录

#include <bits/stdc++.h>
#include <ctime>
#include <cstdlib>
using namespace std;
int lcr;
int ans,sum,cnt,xiong,daxiong;
int main() {
    int i , a , b , c = 0;
    srand( (unsigned)time(NULL));
    for(int i = 1; i <= i; i++) {
        a = rand();
        b = rand();
        if(a == b) a = c;
        cout<<"随机数"<<i<<":"<<a<<" "<<b<<" "<<c<<endl;
        if(c != 0/*命中注定*/ ) {
            cout<<"I love you lcr"<<endl;
            return 0;
        }
        if( a + 1 == b/*大吉*/ ) ans++;
        if(a * 2 == b /*小吉*/)sum++;
        if(a * a == b /*中平*/)cnt++;
        if(a * 2 + 1 == b /*凶*/) xiong++;
        if(i > 52029548) {
            if(lcr == 0 && ans == 0 && sum == 0 && cnt == 0 && xiong == 0)
            cout <<daxiong<<endl;    // 大凶
            return 0;
        }
    }
    getchar();
    return 0;
}