New course! Every coder should learn Generative AI!
Try a free lesson+ 13
+ 12
https://code.sololearn.com/cCSrLzl7wdF9/?ref=app
+ 9
Here's my C# implementation! ✌
LINQ One-Liner〰
num.ToString()
.Select((d, i) => new
{
digit = Char.GetNumericValue(d),
position = i + 1
})
.Sum(p => Math.Pow(p.digit, p.position)) == num
LINQ all the way~ ❤
https://code.sololearn.com/cGhN129A0JLy/?ref=app
+ 7
my trail in c++ without using any extra header file...
I found some disarmonium numbers I.e; less than 5000 are.......
1
2
3
4
5
6
7
8
9
89
135
175
518
598
1306
1676
2427
https://code.sololearn.com/c8q1hFzLgK8e/?ref=app
22 is the updated from 1st
updated for finding disarmonium numbers between 1 and n;
https://code.sololearn.com/cCgcymfahMM9/?ref=app
+ 7
my try in Ruby......
challenge @[disarmonium number]
https://code.sololearn.com/ce5JpwICewJl/?ref=app
+ 4
Thanks for the challenge 👍
Here's my try....
https://code.sololearn.com/WB8QtlQ7P3mf/?ref=app
+ 4
Here's what I did:
https://code.sololearn.com/cy0Q32GF04LT/?ref=app
+ 4
Here's mine in C++
https://code.sololearn.com/cjm7B4P69YPt/?ref=app
+ 3
heres my one liner....
PRINTS all disariums UPTO 400K...
https://code.sololearn.com/cX2RXdjh92TB/?ref=app
+ 3
https://code.sololearn.com/cYfr8aZi1RV6/?ref=app
+ 3
python shot variant
https://code.sololearn.com/cK4YxF5CMHsz/?ref=app
+ 2
Here's mine
https://code.sololearn.com/c8OIdNGrT3U8/?ref=app
+ 2
Here's my shot at it in Python3 - I'm still relatively new here so any feedback would be great:
https://code.sololearn.com/cxI08vZla4Ko/#py
+ 2
Any Disarium number other than 89??
+ 2
Here you go, checks for valid input
https://code.sololearn.com/c3JC93rmyNUj/?ref=app
+ 2
public class festival{
public static void main(String sweets[]){
System.out.println("Happy Diwali to SoloLearn");
}
}
+ 1
https://code.sololearn.com/c8wnWC4MyRnn/?ref=app
I have done using arithmetic operations.