7 kyu
Coding 3min: Give me the equation
302myjinxin2015
Description:
This is the simple version of Shortest Code series. If you need some challenges, please try the challenge version
Task:
Give you three numbers:a b c
,please return an equation(Operators include +,-,*,/), return type is string.
For example:
sc(1,2,3)
should return "1+2=3"
or "2+1=3"
or "3-2=1"
or "3-1=2"
sc(2,2,4)
should return "2+2=4"
or "2*2=4"
or "4/2=2"
or "4-2=2"
sc(6,2,3)
should return "2*3=6"
or "3*2=6"
or "6/2=3"
or "6/3=2"
Return one of the possible answer, you can pass the test.
If there is no equation between a,b,c
, return ""
Series:
- Bug in Apple
- Father and Son
- Jumping Dutch act
- Planting Trees
- Give me the equation
- Find the murderer
- Reading a Book
- Eat watermelon
- Special factor
- Guess the Hat
- Symmetric Sort
- Are they symmetrical?
- Max Value
- Trypophobia
- Virus in Apple
- Balance Attraction
- Remove screws I
- Remove screws II
- Regular expression compression
- Collatz Array(Split or merge)
- Tidy up the room
- Waiting for a Bus
Puzzles
Games
Similar Kata:
Stats:
Created | Apr 1, 2016 |
Published | Apr 1, 2016 |
Warriors Trained | 568 |
Total Skips | 4 |
Total Code Submissions | 1205 |
Total Times Completed | 302 |
JavaScript Completions | 302 |
Total Stars | 13 |
% of votes with a positive feedback rating | 91% of 97 |
Total "Very Satisfied" Votes | 82 |
Total "Somewhat Satisfied" Votes | 13 |
Total "Not Satisfied" Votes | 2 |