请获奖者于2024.2.12 23:59:59 (GMT+8) 以前主动联系@,(QQ:3483761546) 过时不候。

一等奖

奖品: 64GB USB3.2 U盘x1

\because AK_num = 4 > 2

\therefore prize1 = random.choose_in(AK_list, num=2)

\therefore prize1 = @(AK)、 @(AK)

二等奖

奖品: 10~20元随机红包x1

@(AK)、@(390pts)、@(320pts)

random运行结果:@ = ¥12,@ = ¥14、@ = ¥13

三等奖

奖品: 5~10元随机红包x1

@(240pts)、@(210pts)、@(200pts)

random运行结果:@ = ¥7,@ = ¥7、@ = ¥8

随机金额的红包金额由以下代码生成

#include <bits/stdc++.h>
using namespace std;

/*
该代码使用Intel® Digital Random Number Generator (DRNG) 技术确保真随机。
https://www.intel.com/content/www/us/en/developer/articles/guide/intel-digital-random-number-generator-drng-software-implementation-guide.html
*/

int rdseed64_step (uint64_t *seed)
{
    // 从Intel DRNG指令集获取64位RDSEED
	unsigned char ok;

	asm volatile ("rdseed %0; setc %1"
		: "=r" (*seed), "=qm" (ok));

	return (int) ok;
}

int main()
{
	uint64_t rand = 0;
	int result = 0;

	if (rdseed64_step (&rand))
	{
		result = (int) (rand % 11 + 10);
		cout << "The random number(10-20) is " << result << endl;
        cout << "The random number(5-10) is " << result/2 << endl;
	}

	return 0;
}