Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 1.92 KB

File metadata and controls

19 lines (13 loc) · 1.92 KB

Multiply extreme #math #template-literal

by null @uid11

Take the Challenge

This challenge continues from 476 - Sum, it is recommended that you finish that one first, and modify your code based on it to start this challenge.

Implement a type Multiply<A, B> that multiplies two non-negative integers and returns their product as a string. Numbers can be specified as string, number, or bigint.

For example,

type T0 = Multiply<2, 3> // '6'
type T1 = Multiply<3, '5'> // '15'
type T2 = Multiply<'4', 10> // '40'
type T3 = Multiply<0, 16> // '0'
type T4 = Multiply<'13', '21'> // '273'
type T5 = Multiply<'43423', 321543n> // '13962361689'

Back Share your Solutions Check out Solutions

Related Challenges

476・Sum