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

where is my mistake (С/С++)
Posted by alek._lys. 18 May 2009 00:26
#include "stdio.h"

int main()
{
    unsigned long long int totalQuantity=0;
    scanf("%u",&totalQuantity);
    printf("%u\n",(totalQuantity%7));
    return 0;
}
Re: where is my mistake (С/С++)
Posted by Sergey Lazarev (MSU TB) 18 May 2009 19:34
unsigned long long is not bigger than 18446744073709551615 < 10^20. In this problem 1<="totalQuantity"<=10^50.
And if you want read unsigned long long you must write scanf("%I64u",&n);