petya love lucky number everybody know lucky number positive integer decimal representation contain lucky digit 4 7 for example number 47 744 4 lucky 5 17 467 notPetya array consist n number he want perform m operation type add l r d add integer d element index belong interval l r inclusive 1lrn1d104 count l r find print screen lucky number element index belong interval l r inclusive 1lrn each lucky number count times appear interval petya list operation the operation addition array will not number exceed 104 help Petya write program perform operation