Please explain the Output

Правка en2, от Furcifer, 2016-10-25 23:16:24

I was trying to solve this problem uva 13136 Recurrences .

But, I couldn't manage to understand the output.

For example in test case 1, n = 1,A0 = 1,B0 = 2,C0 = 3. So, According to the relations given, I should get, S0 = 0 A1 = 4-6-9=11 B1 = 5-8-12 = -15 C1 = 2-1 = 1 S1 = 0+(-11)*(-15)+1 = 166 so,ans should be 166%10 = 6. But the output is given 5.

Теги input-output, unable to understand, help needed

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en4 Английский Furcifer 2016-10-26 19:56:24 2 Tiny change: '1 = 4-6-9=11<br>\nB1' -> '1 = 4-6-9= -11<br>\nB1'
en3 Английский Furcifer 2016-10-26 10:26:17 16 Tiny change: ' = 166\nso,ans sho' -> ' = 166\n<br>so,ans sho'
en2 Английский Furcifer 2016-10-25 23:16:24 3 Tiny change: 'ccording the relat' -> 'ccording to the relat'
en1 Английский Furcifer 2016-10-25 23:15:36 496 Initial revision (published)