Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок0
sum of the 10 largest prime numbers that can be formed out of that number
Sample input 1234 Sample output 1474 Explaination 2+23+223+1223 = 1474
4 ответов
- 3
Sorry to bother you this is my brother's work so thats why iam posting here im an non it student
+ 3
Online Mining junction ,
i have the feeling that the task description is not complete. let me ask you:
-> are the numbers that should be summed: 1 x 1digit, 1 x 2 digit, 1 x 3 digit, 1 x 4 digit ?
-> should the sequence of the digits in your sample be all in ascending order for each number ?
these are the prime numbers that can be build from 1234 with ascending order of the digits:
[2, 3, 11, 13, 23, 113, 223, 233, 1123, 1223, 2333] i can not see a clear rule how the numbers you mentioned are selected
+ 2
Which language are you using? Can you add your attempt from the code playground here and explain what isn't working?
I don't think you're expecting someone to do your homework for you, right?
0
It's no bother and it's nice you're helping your brother. Make him write the code into the code playground and attach it here and someone can help him