Created
October 6, 2012 15:31
-
-
Save Abreto/3845230 to your computer and use it in GitHub Desktop.
枚举法练习
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* E1.2.4 - 售货员. Ural State University Problem Archive 1012 Conductor. */ | |
#include <stdio.h> | |
int main(void) | |
{ | |
int i = 0; | |
double P = 0, Q = 0; | |
scanf("%lf %lf", &P, &Q); | |
while(++i, !(( (int)(i * Q/100) - (int)(i * P/100) ) > 0)); | |
return !printf("%d\n", i); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment