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 1887. Frequent Flyer Card

I probably didn't understand the problem statement correctly. does the notation on the formula really mean product?
Posted by Radi Muhammad Reza 1 Nov 2011 10:18
I calculated probability of appearance of digit 0~9 as last digit and for first sample:
0: 0.925...
1: 0.009...
2~9: 0.008...
and expectation: 344.0203...

However, if i set probability from 0~9: all 0.1
the expectation becomes correct: 29.2896825397

I probably am missing something or misinterpreted something. Please, help me someone.

Many many thanks in advance.

[AC]
[Code Deleted]

Edited by author 01.11.2011 10:19

Edited by author 01.11.2011 13:10

Edited by author 01.11.2011 13:25
Re: I probably didn't understand the problem statement correctly. does the notation on the formula really mean product?
When you have two modulo operations, you cannot just apply each of them on each step. You can take everything modulo 11 on each step, but only the last result may be taken modulo 10. If you fix it, you will get equal probabilities.
P.S. hide your code - let other people solve this problem themselves.
Re: I probably didn't understand the problem statement correctly. does the notation on the formula really mean product?
Posted by Radi Muhammad Reza 1 Nov 2011 13:11
Thanks a lot :)