Skip to main content
deleted 160 characters in body
Source Link
Giuseppe
  • 28.8k
  • 3
  • 31
  • 105

R, 25 22 23 bytes

-3 bytes thanks to MickyT

sumcat(scanc()*33:5),-scan1)%*%scan())

Try it online!

reads from stdin and returns the value.

###21 bytes: pryr::f(sum(n*3:5)-d)

an anonymous function with the pryr library.Try it online!

R, 25 22 bytes

-3 bytes thanks to MickyT

sum(scan()*3:5)-scan()

Try it online!

reads from stdin and returns the value.

###21 bytes: pryr::f(sum(n*3:5)-d)

an anonymous function with the pryr library.

R, 25 23 bytes

cat(c(3:5,-1)%*%scan())

Try it online!

added 109 characters in body
Source Link
Giuseppe
  • 28.8k
  • 3
  • 31
  • 105

R, 2525 22 bytes

-3 bytes thanks to MickyT

function(n,d)sum(n*3scan()*3:5)-dscan()

Try it online!Try it online!

An anonymous function;reads from stdin and returns the value.

###21 bytes: pryr::f(sum(n*3:5)-d)

an anonymous function with the pryr library.

R, 25 bytes

function(n,d)sum(n*3:5)-d

Try it online!

An anonymous function; returns the value.

R, 25 22 bytes

-3 bytes thanks to MickyT

sum(scan()*3:5)-scan()

Try it online!

reads from stdin and returns the value.

###21 bytes: pryr::f(sum(n*3:5)-d)

an anonymous function with the pryr library.

Source Link
Giuseppe
  • 28.8k
  • 3
  • 31
  • 105

R, 25 bytes

function(n,d)sum(n*3:5)-d

Try it online!

An anonymous function; returns the value.