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 1283. Dwarf

wa 7
Posted by Mikron 12 Jul 2013 19:08
why wa #7
please help(

#include <stdio.h>

int main(void)
{
    int s;
    int p;
    float zo;

    int t = 0;

    scanf("%f",&zo);
    scanf("%d",&s);
    scanf("%d",&p);

    while(zo>s){

        zo -= zo*p/100;
        ++t;

    }

    printf("%d",t);


    return 0;
}
Re: wa 7
Posted by panLevan 4 Sep 2013 01:11
use float instead of int for s and you will get AC