poj 2348
来源:互联网 发布:武汉理工网络教育2017 编辑:程序博客网 时间:2024/06/07 21:51
#include<iostream>#include <stdio.h>#include<memory.h>#define MAX 1000010#define N 100010using namespace std;int main(){ int a,b; while(~scanf("%d%d",&a,&b)){ if(a==0||b==0)break; bool f=1;while(1) { if(a>b)swap(a,b); //b是a 的倍数是必胜 if(b%a==0)break; //如果是b-a>a必胜态 以为他有两种选择,可以选择必胜,也可以选择必败 if(b-a>a)break; b-=a; f=!f; } if(f)printf("Stan wins\n"); else printf("Ollie wins\n");}return 0; }
0 0
- poj 2348
- poj-2348
- poj 2348
- poj 2348
- POJ 2348
- 【POJ】2348
- POJ 2348 博弈论
- poj 2348(博弈)
- 欧几里得游戏(poj 2348)
- poj 2348 欧几里得博弈
- POJ 2348 (博弈)
- POJ
- poj
- POJ
- POJ
- poj
- poj
- POJ
- freemarker中include与import的区别
- Google App Engine 入门教程
- 使用python脚本模拟登录知乎
- USB2.0差分走线要求
- MySQL数据库导入.sql文件
- poj 2348
- swift中的元组
- FreeMarker中<#include>和<#import>标签的区别
- 【ReactiveX】RxSwift 集成与应用
- AngularJS 初探(一)
- python .T操作
- 第七次笔记
- idea使用gradle搭建SpringBoot
- RESTful架构