Skip to main content
optimized code
Source Link
M L
  • 3.3k
  • 1
  • 19
  • 19

HPPPL (HP Prime Programming Language), 5858 57 bytes

The * between 10 and min isn’t necessary, so I removed it.

EXPORT s(m)
BEGIN
return sum([2,3,4,1].*m)+10*min+10min(m);
END;

HPPPL is the programming language for the HP Prime color graphing calculator/CAS.

Example runs:

HPPPL screen capture of sjoelen point count program

If it doesn’t have to be a program, then it’s realizable in a 4040 39 bytes one-liner:

m:=[3,5,4,3];sum([2,3,4,1].*m)+10*min+10min(m)

HPPPL (HP Prime Programming Language), 58 bytes

EXPORT s(m)
BEGIN
return sum([2,3,4,1].*m)+10*min(m);
END;

HPPPL is the programming language for the HP Prime color graphing calculator/CAS.

Example runs:

HPPPL screen capture of sjoelen point count program

If it doesn’t have to be a program, then it’s realizable in a 40 bytes one-liner:

m:=[3,5,4,3];sum([2,3,4,1].*m)+10*min(m)

HPPPL (HP Prime Programming Language), 58 57 bytes

The * between 10 and min isn’t necessary, so I removed it.

EXPORT s(m)
BEGIN
return sum([2,3,4,1].*m)+10min(m);
END;

HPPPL is the programming language for the HP Prime color graphing calculator/CAS.

Example runs:

HPPPL screen capture of sjoelen point count program

If it doesn’t have to be a program, then it’s realizable in a 40 39 bytes one-liner:

m:=[3,5,4,3];sum([2,3,4,1].*m)+10min(m)
added
Source Link
M L
  • 3.3k
  • 1
  • 19
  • 19

HPPPL (HP Prime Programming Language), 58 bytes

EXPORT s(m)
BEGIN
return sum([2,3,4,1].*m)+10*min(m);
END;

HPPPL is the programming language for the HP Prime color graphing calculator/CAS.

Example runs:

HPPPL screen capture of sjoelen point count program

If it doesn’t have to be a program, then it’s realizable in a 40 bytes one-liner:

m:=[3,5,4,3];sum([2,3,4,1].*m)+10*min(m)

HPPPL (HP Prime Programming Language), 58 bytes

EXPORT s(m)
BEGIN
return sum([2,3,4,1].*m)+10*min(m);
END;

HPPPL is the programming language for the HP Prime color graphing calculator/CAS.

Example runs:

HPPPL screen capture of sjoelen point count program

HPPPL (HP Prime Programming Language), 58 bytes

EXPORT s(m)
BEGIN
return sum([2,3,4,1].*m)+10*min(m);
END;

HPPPL is the programming language for the HP Prime color graphing calculator/CAS.

Example runs:

HPPPL screen capture of sjoelen point count program

If it doesn’t have to be a program, then it’s realizable in a 40 bytes one-liner:

m:=[3,5,4,3];sum([2,3,4,1].*m)+10*min(m)
Source Link
M L
  • 3.3k
  • 1
  • 19
  • 19

HPPPL (HP Prime Programming Language), 58 bytes

EXPORT s(m)
BEGIN
return sum([2,3,4,1].*m)+10*min(m);
END;

HPPPL is the programming language for the HP Prime color graphing calculator/CAS.

Example runs:

HPPPL screen capture of sjoelen point count program