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 1243. Divorce of the Seven Dwarfs

Help, I have a bug in the 5 test
Posted by PEDORENKO 18 Aug 2014 21:44
#include <iostream>
#include <math.h>

using namespace std;

int main(){

    double x;
    int i;

    cin >> x;

    x = fmod (x, 7.0);

    printf("%.0f",x);

    system("pause");
    return 0;

}

Edited by author 18.08.2014 21:49
Re: Help, I have a bug in the 5 test
Posted by GastonFontenla 9 Aug 2015 03:18
it's ovbious that a number of 50 digits won't fit in a double. Such number wouldn't even fit in long long. You need other method...