ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1011. Conductors

I dont understand test number 3
Posted by AC-SKYDOS 17 Jul 2009 23:45
Whats wrong with my code?

#include <stdlib.h>
#include <math.h>
#include <vector>
#include <iostream>
#include <string>
#include <fstream>
#include <algorithm>
#include <utility>
#include <stdlib.h>
#include <set>

using namespace std;

bool normal (float, float);

int main() {
    float begin, end, y1, y2;
    int counter = 1;

    scanf ("%f %f", &begin, &end);

    do{
        y1 = (begin*counter)/100;
        y2 = (end*counter)/100;
        if (normal(y1, y2)){
            printf ("%i\n", counter);
            return 0;
        }
        counter++;
    } while (true);

    return (0);
}

bool normal (float a, float b){
    if (ceil(a)<=(float)b) return true;
    else return false;
}