Sha256: 6f795c310bfb2f78e810e2ec81c4bae281a4591b9474cd6a460dcbc56104781b

Contents?: true

Size: 202 Bytes

Versions: 149

Compression:

Stored size: 202 Bytes

Contents

difference_of_squares <- function(natural_number) {
  num_sequence <- seq_len(natural_number)
  square_sums <- sum(num_sequence)^2
  sum_squares <- sum(num_sequence^2)
  sum(square_sums - sum_squares)
}

Version data entries

149 entries across 149 versions & 1 rubygems

Version Path
trackler-2.1.0.21 tracks/r/exercises/difference-of-squares/example.R
trackler-2.1.0.20 tracks/r/exercises/difference-of-squares/example.R
trackler-2.1.0.19 tracks/r/exercises/difference-of-squares/example.R
trackler-2.1.0.18 tracks/r/exercises/difference-of-squares/example.R
trackler-2.1.0.17 tracks/r/exercises/difference-of-squares/example.R
trackler-2.1.0.16 tracks/r/exercises/difference-of-squares/example.R
trackler-2.1.0.15 tracks/r/exercises/difference-of-squares/example.R
trackler-2.1.0.14 tracks/r/exercises/difference-of-squares/example.R
trackler-2.1.0.13 tracks/r/exercises/difference-of-squares/example.R
trackler-2.1.0.12 tracks/r/exercises/difference-of-squares/example.R
trackler-2.1.0.11 tracks/r/exercises/difference-of-squares/example.R
trackler-2.1.0.10 tracks/r/exercises/difference-of-squares/example.R
trackler-2.1.0.9 tracks/r/exercises/difference-of-squares/example.R
trackler-2.1.0.8 tracks/r/exercises/difference-of-squares/example.R
trackler-2.1.0.7 tracks/r/exercises/difference-of-squares/example.R
trackler-2.1.0.6 tracks/r/exercises/difference-of-squares/example.R
trackler-2.1.0.5 tracks/r/exercises/difference-of-squares/example.R
trackler-2.1.0.4 tracks/r/exercises/difference-of-squares/example.R
trackler-2.1.0.3 tracks/r/exercises/difference-of-squares/example.R
trackler-2.1.0.2 tracks/r/exercises/difference-of-squares/example.R