#3a value = 7*1296**57-8*216**30+35 result = "" while value>0: result += str(value%6) value //=6 print("пятёрок:",result.count("5")) #3b value = (512**78-512**60)*(512**5+64**5) result = "" while value>0: result += str(value%8) value //=8 print("семёрок:",result.count("7")) #3c value = (729**41-81**16)*(729**15+9**5) result = "" while value>0: result += str(value%9) value //=9 print("восьмёрок:",result.count("8")) #4a value = 11*15**65+18*15**38-14*15**17+19*15**11+18338 symbols = "0123456789ABCDEF" result = "" answer = "" while value>0: result += symbols[value%15] value//=15 for position in range (len(result),0,-1): answer += result[position-1] print("различных цифр:",len(set(answer))) #4b value = 3*11**58+15*11**55-99*11**18+125*11**9+381 symbols = "0123456789ABCDEF" system = 11 result = "" answer = "" while value>0: result += symbols[value%11] value//=11 for position in range (len(result),0,-1): answer += result[position-1] print("различных цифр:",len(set(answer))) #4c value = 12*7**135+11*7**92-63*7**22+17*7**11+157 symbols = "0123456789ABCDEF" result = "" answer = "" while value>0: result += symbols[value%7] value//=7 for position in range (len(result),0,-1): answer += result[position-1] print("различных цифр:",len(set(answer))) #5a value = 7**103+6*7**104-3*7**57+98 result = 0 while value>0: result+=value%7 value = value//7 print("сумма цифр:",result) #5b value = 6**203+5*6**405-3*6**144+76 result = 0 while value>0: result+=value%6 value = value//6 print("сумма цифр:",result) #5c value = 4**1103+3*4**1444-2*4**144+66 result = 0 while value>0: result += value%4 value = value//4 print("сумма цифр:",result)