Skip to main content
I completely forgot to change the language name like a dummy
Source Link
SjoerdPennings
  • 2.5k
  • 16
  • 30

[Python 3.8 (pre-release)]BRASCA, 18 bytes

Takes input as <3-par>,<4-par>,<5-par>,<difficulty>

Ci',G,3*$4*+$5*+$-

Try it online!

Explanation

C                   - Set implicit output to number mode
 i',G               - Use numbers instead of charcodes for 0-9. Then split by commas.
     ,              - Reverse stack so the 3par is at the top.
      3*            - 3par * 3
        $4*+        - 4par * 4, then add to 3par
            $5*+    - 5par * 5, then add to total
                $-  - total - difficulty
<implicit>          - Print it

[Python 3.8 (pre-release)], 18 bytes

Takes input as <3-par>,<4-par>,<5-par>,<difficulty>

Ci',G,3*$4*+$5*+$-

Try it online!

Explanation

C                   - Set implicit output to number mode
 i',G               - Use numbers instead of charcodes for 0-9. Then split by commas.
     ,              - Reverse stack so the 3par is at the top.
      3*            - 3par * 3
        $4*+        - 4par * 4, then add to 3par
            $5*+    - 5par * 5, then add to total
                $-  - total - difficulty
<implicit>          - Print it

BRASCA, 18 bytes

Takes input as <3-par>,<4-par>,<5-par>,<difficulty>

Ci',G,3*$4*+$5*+$-

Try it online!

Explanation

C                   - Set implicit output to number mode
 i',G               - Use numbers instead of charcodes for 0-9. Then split by commas.
     ,              - Reverse stack so the 3par is at the top.
      3*            - 3par * 3
        $4*+        - 4par * 4, then add to 3par
            $5*+    - 5par * 5, then add to total
                $-  - total - difficulty
<implicit>          - Print it
Source Link
SjoerdPennings
  • 2.5k
  • 16
  • 30

[Python 3.8 (pre-release)], 18 bytes

Takes input as <3-par>,<4-par>,<5-par>,<difficulty>

Ci',G,3*$4*+$5*+$-

Try it online!

Explanation

C                   - Set implicit output to number mode
 i',G               - Use numbers instead of charcodes for 0-9. Then split by commas.
     ,              - Reverse stack so the 3par is at the top.
      3*            - 3par * 3
        $4*+        - 4par * 4, then add to 3par
            $5*+    - 5par * 5, then add to total
                $-  - total - difficulty
<implicit>          - Print it