ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1887. Карта постоянного пассажира

I probably didn't understand the problem statement correctly. does the notation on the formula really mean product?
Послано Radi Muhammad Reza 1 ноя 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?
Послано ...†.†.†... Stigius ...†.†.†... 1 ноя 2011 12:51
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?
Послано Radi Muhammad Reza 1 ноя 2011 13:11
Thanks a lot :)