X07
This commit is contained in:
parent
9c30cf53ba
commit
d05cedbd87
|
@ -0,0 +1,12 @@
|
|||
Napisz gramatykę Thraxową, która do liczby nieujemnej (w zapisie
|
||||
dziesiętnym) dodaje 4.
|
||||
|
||||
Podpowiedzi:
|
||||
- prościej zdefiniować automat odwrotny, a potem użyć funkcji Reverse
|
||||
- rozbić na 2 przypadki: dodawanie z przeniesieniem i bez przeniesienia
|
||||
- uwagi na ciąg dziewiątek przy przeniesieniu!
|
||||
- czasami trzeba wydłużyć liczbę o jedną cyfrę, transduktor
|
||||
"" : "1" dodaje jedynkę na końcu.
|
||||
|
||||
POINTS: 2
|
||||
DEADLINE: 2018-12-21 23:59
|
|
@ -0,0 +1,11 @@
|
|||
Input string: Output string: 4
|
||||
Input string: Output string: 335
|
||||
Input string: Output string: 786
|
||||
Input string: Output string: 7
|
||||
Input string: Output string: 99998
|
||||
Input string: Output string: 55559
|
||||
Input string: Output string: 10000
|
||||
Input string: Output string: 387899881
|
||||
Input string: Output string: 40002
|
||||
Input string: Output string: 10013
|
||||
Input string:
|
|
@ -0,0 +1,10 @@
|
|||
0
|
||||
331
|
||||
782
|
||||
3
|
||||
99994
|
||||
55555
|
||||
9996
|
||||
387899877
|
||||
39998
|
||||
10009
|
Loading…
Reference in New Issue