Skip to main content
Commonmark migration
Source Link

#Swift, 76 bytes

Swift, 76 bytes

import Foundation
for i in 1...9{print(Int(pow((pow(10,Double(i))-1)/9,2)))}

Try it online!

If printing as an array of lines is allowed, here is 74 byte approach:

import Foundation
print((1...9).map{Int(pow((pow(10,Double($0))-1)/9,2))})

Try it online!

#Swift, 76 bytes

import Foundation
for i in 1...9{print(Int(pow((pow(10,Double(i))-1)/9,2)))}

Try it online!

If printing as an array of lines is allowed, here is 74 byte approach:

import Foundation
print((1...9).map{Int(pow((pow(10,Double($0))-1)/9,2))})

Try it online!

Swift, 76 bytes

import Foundation
for i in 1...9{print(Int(pow((pow(10,Double(i))-1)/9,2)))}

Try it online!

If printing as an array of lines is allowed, here is 74 byte approach:

import Foundation
print((1...9).map{Int(pow((pow(10,Double($0))-1)/9,2))})

Try it online!

Source Link
Mr. Xcoder
  • 42.5k
  • 9
  • 81
  • 214

#Swift, 76 bytes

import Foundation
for i in 1...9{print(Int(pow((pow(10,Double(i))-1)/9,2)))}

Try it online!

If printing as an array of lines is allowed, here is 74 byte approach:

import Foundation
print((1...9).map{Int(pow((pow(10,Double($0))-1)/9,2))})

Try it online!