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 1224. Spiral

Show all messages Hide all messages

do not understand.... Erik 26 Oct 2004 04:54
i see not the problem in my code
but the test 12# yes

can any1 help me???
Thanks


#include <stdio.h>

void main(void)
{
float n,m;
scanf("%f%f",&n,&m);

    if(m>=n)
        printf("%.0f",2.0*n-2.0);
    if(m<n)
        printf("%.0f",2.0*m-1.0);
}
Use longer type instead of float (-) Michael Rybak (accepted@ukr.net) 26 Oct 2004 19:45