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

Common Board

HHEELLPP !!!! How can I check if the number is devides by 7 ???
Posted by Romanchik Vitaly 9 Jul 2003 21:34
HHEELLPP !!!! How can I check if the number is devides by 7 ???
A hint
Posted by TheBlaNK 9 Jul 2003 22:17
z=x+y

z mod c = (x mod c + y mod c) mod c

c is only 7.It's not big.
and the number always has 1, 2, 3, and 4 .

Good luck,
TheBlaNK

P.S. two of my friends used search (permute them) and got AC. - -'
Oops!! i misunderstand the question,sorry.i think u ask for 1095 (-)
Posted by TheBlaNK 10 Jul 2003 01:05
> z=x+y
>
> z mod c = (x mod c + y mod c) mod c
>
> c is only 7.It's not big.
> and the number always has 1, 2, 3, and 4 .
>
> Good luck,
> TheBlaNK
>
> P.S. two of my friends used search (permute them) and got AC. - -'
It's OK ! I mean this problem ! Thank you wery much !!!
Posted by Romanchik Vitaly 10 Jul 2003 02:25
> > z=x+y


> >


> > z mod c = (x mod c + y mod c) mod c


> >


> > c is only 7.It's not big.


> > and the number always has 1, 2, 3, and 4 .


> >


> > Good luck,


> > TheBlaNK


> >


> > P.S. two of my friends used search (permute them) and got AC. - -'