现在的位置: 首页 > 综合 > 正文

2011阿里巴巴程序设计公开赛 1001 Coin Game

2013年11月10日 ⁄ 综合 ⁄ 共 230字 ⁄ 字号 评论关闭

 

博奕题目

#include <iostream>

using namespace std;

int main(){

	int t,i;
	cin>>t;
	for(i=1;i<=t;i++){
		int n,k;
		cin>>n>>k;

		if(k>=n){
		printf("Case %i: first\n",i);
		}
		else if(n%2==1 && k==1){
			printf("Case %i: first\n",i);
		}
		else {
			printf("Case %i: second\n",i);
		}

	}
		
	return 0;
}



抱歉!评论已关闭.