Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

added 442 characters in body
Source Link
Dion
  • 4k
  • 15
  • 43

Python 3, 38 bytes

print([str(x)*x for x in range(1,10)])

Try it online!

C++ (gcc) , 59 bytes

for(int i=1;i<10;++i){for(int x=1;x<=i;++x){std::cout<<i;}}

Try it online!

Started learning c++ an hour ago, tried codegolf :)

Python 3, 38 bytes

print([str(x)*x for x in range(1,10)])

Try it online!

Python 3, 38 bytes

print([str(x)*x for x in range(1,10)])

Try it online!

C++ (gcc) , 59 bytes

for(int i=1;i<10;++i){for(int x=1;x<=i;++x){std::cout<<i;}}

Try it online!

Started learning c++ an hour ago, tried codegolf :)

Source Link
Dion
  • 4k
  • 15
  • 43

Python 3, 38 bytes

print([str(x)*x for x in range(1,10)])

Try it online!

AltStyle によって変換されたページ (->オリジナル) /