U E D R , A S I H C RSS

A_Multiplication_Game/곽병학

#include<iostream>
using namespace std;

int main() {
	int turn =1;
	long double n;
	while(cin>>n) {
		while(1) {
			n /= turn%2 == 1 ? 9.0 : 2.0;
			turn++;
			if(n <= 1) break;
		}
		switch(turn %2) {
			case 0:
				cout<<"Stan wins."<<endl;
				break;
			case 1:
				cout<<"Ollie wins."<<endl;
				break;
		}
		turn =1;
	}
}
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:22:23
Processing time 0.0117 sec