HDU(1525)Euclid's Game
来源:互联网 发布:php utf8转gbk 编辑:程序博客网 时间:2024/06/02 01:31
#include <iostream>#include <stdio.h>#include <string.h>#include <algorithm>#include <set>using namespace std;int main() { int a,b; while(scanf("%d%d",&a,&b)&&(a+b)){ if(a<b) swap(a, b); int flag = 1; while(1){ if(a == b || a >= 2*b) break; else{ a = a - b; swap(a,b); flag = !flag; } } if(flag) printf("Stan wins\n"); else printf("Ollie wins\n"); } return 0;}
0 0
- hdu 1525 Euclid's Game
- hdu 1525 Euclid's Game
- HDU 1525 - Euclid's Game
- hdu 1525 Euclid's Game
- HDU(1525)Euclid's Game
- HDU 1525 Euclid's Game
- hdu 1525 Euclid's Game
- HDU 1525 Euclid’s Game
- hdu 1525 Euclid's Game
- HDU-1525-Euclid's Game
- HDU 1525 Euclid's Game
- HDU 1525 Euclid's Game (博弈)
- hdu 1525 Euclid's Game 博弈
- [简单博弈] hdu 1525 Euclid's Game
- hdu 1525 Euclid's Game 博弈
- HDU 1525 Euclid's Game 博弈
- HDU 1525 Euclid's Game (博弈)
- HDU 1525 Euclid's Game 博弈
- Codeforces Round #183 (Div. 2) B. Calendar
- FZU Problem 2030 括号问题
- HDU(3374) (KMP + 最小表示法)
- HOJ (1042) 整数划分
- HDU(2509) Be the Winner /HDU(1907) John (Nim 博弈)
- HDU(1525)Euclid's Game
- HDU(1847)Good Luck in CET-4 Everybody!
- HDU(2149)Public Sale 博弈
- HDU(2897)邂逅明下
- HDU(1851) A Simple Game (博弈)
- HDU(1850) Being a Good Boy in Spring Festival (博弈)
- Vizrt数据处理中的终极武器之SMM-Shared Memory Map
- HDU(1517)A Multiplication Game(博弈)
- php 常用正则表达式