Skip to main content
deleted 16 characters in body
Source Link
emanresu A
  • 44.3k
  • 5
  • 100
  • 240

Jelly, 7 bytes (non-competing)

‘⁵XỊ¤¿+

Try it online!

How it works

‘⁵XỊ¤¿+  Main link. Arguments: n, m (integers)

    ¤    Combine the three atoms to the left into a niladic chain.
 ⁵       Yield 10.
  X      Pseudo-randomly generate a positive integer not greater than 10.
   Ị     Insignificant; test if the generated integer is 1 (or less).
     ¿   While chain yields 1:
‘          Increment n.
      +  Add m to the result.

Jelly, 7 bytes (non-competing)

‘⁵XỊ¤¿+

Try it online!

How it works

‘⁵XỊ¤¿+  Main link. Arguments: n, m (integers)

    ¤    Combine the three atoms to the left into a niladic chain.
 ⁵       Yield 10.
  X      Pseudo-randomly generate a positive integer not greater than 10.
   Ị     Insignificant; test if the generated integer is 1 (or less).
     ¿   While chain yields 1:
‘          Increment n.
      +  Add m to the result.

Jelly, 7 bytes

‘⁵XỊ¤¿+

Try it online!

How it works

‘⁵XỊ¤¿+  Main link. Arguments: n, m (integers)

    ¤    Combine the three atoms to the left into a niladic chain.
 ⁵       Yield 10.
  X      Pseudo-randomly generate a positive integer not greater than 10.
   Ị     Insignificant; test if the generated integer is 1 (or less).
     ¿   While chain yields 1:
‘          Increment n.
      +  Add m to the result.
deleted 13 characters in body
Source Link
Dennis
  • 210.6k
  • 41
  • 370
  • 825

Jelly, 7 bytes (non-competing)

‘⁵XỊ¤¿+

Try it online!

How it works

‘⁵XỊ¤¿+  Main link. Arguments: n, m (integers)

 Increment n.
    ¤    Combine the three atoms to the left into a niladic chain.
 ⁵       Yield 10.
  X      Pseudo-randomly generate a positive integer not greater than 10.
   Ị     Insignificant; test if the generated integer is 1 (or less).
     ¿   While chain yields 1,:
‘ execute         Increment n.
      +  Add m to the result.

Jelly, 7 bytes (non-competing)

‘⁵XỊ¤¿+

Try it online!

How it works

‘⁵XỊ¤¿+  Main link. Arguments: n, m (integers)

 Increment n.
    ¤    Combine the three atoms to the left into a niladic chain.
 ⁵       Yield 10.
  X      Pseudo-randomly generate a positive integer not greater than 10.
   Ị     Insignificant; test if the generated integer is 1 (or less).
     ¿   While chain yields 1, execute .
      +  Add m to the result.

Jelly, 7 bytes (non-competing)

‘⁵XỊ¤¿+

Try it online!

How it works

‘⁵XỊ¤¿+  Main link. Arguments: n, m (integers)

    ¤    Combine the three atoms to the left into a niladic chain.
 ⁵       Yield 10.
  X      Pseudo-randomly generate a positive integer not greater than 10.
   Ị     Insignificant; test if the generated integer is 1 (or less).
     ¿   While chain yields 1:
‘          Increment n.
      +  Add m to the result.
Source Link
Dennis
  • 210.6k
  • 41
  • 370
  • 825

Jelly, 7 bytes (non-competing)

‘⁵XỊ¤¿+

Try it online!

How it works

‘⁵XỊ¤¿+  Main link. Arguments: n, m (integers)

‘        Increment n.
    ¤    Combine the three atoms to the left into a niladic chain.
 ⁵       Yield 10.
  X      Pseudo-randomly generate a positive integer not greater than 10.
   Ị     Insignificant; test if the generated integer is 1 (or less).
     ¿   While chain yields 1, execute ‘.
      +  Add m to the result.