首页 > 技术文章 > RP测试器

fusiwei 2020-12-04 19:11 原文

RP测试器

代码:

#include<bits/stdc++.h>
using namespace std;
int main()
{
	srand(time(NULL));
	printf("The RP Test Program for NOIP2020\n");
	printf("Please write down your name:");
	char s[200];
	scanf("%s",s+1);
	int op=rand()%101;
	printf("Your RP on NOIP2020 is:\n");
	printf("%d\n",op);
	if(op<10)
		printf("You'll GG...\n");
	else if(op<50)
		printf("Good luck!\n");
	else if(op<80)
		printf("Congratulations!\n");
	else
		printf("Wuhu!!Qifei!!!!\n");
    return 0;
}

推荐阅读