Codeforces C. Beaver game

Source: Internet
Author: User

Http://codeforces.com/contest/78/problem/C

 

// Game <br/> // indicates that a person can fold a wooden stick into equal segments at a time. No less than is not seen at the beginning and he thinks it is not greater than K, english is too bad.) <br/> // if the number of wooden sticks is an even number, the latter wins. If you repeat the first operation, the result is OK, you can get the result by judging the condition of one entry. <br/> // The result is an even number. <br/> # include <stdio. h> <br/> # include <math. h> <br/> int main () <br/>{< br/> int n, m, K; <br/> while (scanf ("% d", & N, & M, & K )! = EOF) <br/>{< br/> int d = SQRT (double (m); <br/> int flag = 0; <br/> If (N % 2 = 0) <br/>{< br/> printf ("marsel/N"); <br/> continue; <br/>}< br/> for (INT I = 1; I <= D; I ++) // do not use the O (N) search factor <br/> {<br/> If (M % I = 0 & (I> = K) | (M/I> = K & I! = 1) // determines whether t can evenly break a wooden rod <br/> {<br/> flag = 1; <br/> break; <br/>}< br/> If (M = 1) // The length is 1 M. <br/> flag = 0; <br/> If (FLAG) <br/> printf ("Timur/N"); <br/> else <br/> printf ("marsel/N "); <br/>}< br/> return 0; <br/>}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.