+++++ +++ [ > +++++ + < - ] > +. -. .
const returnhundred = _ => [_=+!_+[+!!_]]*_- +++++ +++
- [
- > +++++ +
- < -
- ]
- > +.
- -.
- .
// TODO: Add your tests here // Starting from Node 10.x, [Mocha](https://mochajs.org) is used instead of our custom test framework. // [Codewars' assertion methods](https://github.com/Codewars/codewars.com/wiki/Codewars-JavaScript-Test-Framework) // are still available for now. // // For new tests, using [Chai](https://chaijs.com/) is recommended. // You can use it by requiring: // const assert = require("chai").assert; // If the failure output for deep equality is truncated, `chai.config.truncateThreshold` can be adjusted.
- // TODO: Add your tests here
- // Starting from Node 10.x, [Mocha](https://mochajs.org) is used instead of our custom test framework.
- // [Codewars' assertion methods](https://github.com/Codewars/codewars.com/wiki/Codewars-JavaScript-Test-Framework)
- // are still available for now.
- //
- // For new tests, using [Chai](https://chaijs.com/) is recommended.
- // You can use it by requiring:
- // const assert = require("chai").assert;
- // If the failure output for deep equality is truncated, `chai.config.truncateThreshold` can be adjusted.
Test.assertEquals(returnhundred(),100)
returnhundred=_=>Math.log(Math.pow(Math.E,19*19-250+3*5-30*0.3-3*3-2*2*2));
function returnhundred() {return ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~((((('Ϩ'.charCodeAt() / '2'.charCodeAt()) * ('ˮ'.charCodeAt() / "–".charCodeAt())) + "΄".charCodeAt()) - (2 * "ǂ".charCodeAt()))) * ('✐'.charCodeAt() / 'd'.charCodeAt());}- returnhundred=_=>Math.log(Math.pow(Math.E,19*19-250+3*5-30*0.3-3*3-2*2*2));
input two objects:
classroom={x:x1,y:y1};
teacher={x:x2,y:y2};
give another float d,
that is how long you shouts.
return 'fuck dude!'if the teachercannothear.
return 'shut up!'ifhe can hear out.
return 'sit well!'if he is in the classroom.
(i cannot say english so well.)
//
Test.assertEquals(f({x1:1,y1:2},{x2:5,y1:3},3.3),'fuck dude!')//he cannot hear that
Test.assertEquals(f({x1:1,y1:3},{x2:4,y1:3},3.3),'shut up!')//he can hear that
Test.assertEquals(f({x1:1,y1:2},{x2:1,y1:2},0.1),'sit well!')//he is in the classroom
Test.assertEquals(f({x1:1,y1:2},{x2:4,y1:2},3),'fuck dude!')//he cannot hear well of that
Test.assertEquals(f({x1:1,y1:2},{x2:5,y1:3},0),'dumb!')//the dist. is 0
//more tests here
/*var testInputs=[
[{x1:3,y1:4},{x2:3,y2:9},4.999], [{x1:},{},7]
]
var res=[
]
it will be finished*/
f=_=>{_.sort();return _[0]!=_[1]?_[0]:_[_.length-1]==_[_.length-2]?'Error':_[_.length-1]};
describe("Solution", function() {
it("simple", function() {
Test.assertEquals(f([1,1,1,1,1,1,1,4,1,1]),4);
Test.assertEquals(f(['AD','AD','Ad','AD']),'Ad');
Test.assertSimilar(f(['null','nulll','null']),'nulll');
});
it("wrong", function() {
Test.assertEquals(f([undefined,undefined,undefined,undefined]),'Error');
});
});
// TODO: Add your tests here // Starting from Node 10.x, [Mocha](https://mochajs.org) is used instead of our custom test framework. // [Codewars' assertion methods](https://github.com/Codewars/codewars.com/wiki/Codewars-JavaScript-Test-Framework) // are still available for now. // // For new tests, using [Chai](https://chaijs.com/) is recommended. // You can use it by requiring: Test.assertSimilar(neg('x'), NaN) Test.assertEquals(neg('-13512.1111'),13512.1111)
- // TODO: Add your tests here
- // Starting from Node 10.x, [Mocha](https://mochajs.org) is used instead of our custom test framework.
- // [Codewars' assertion methods](https://github.com/Codewars/codewars.com/wiki/Codewars-JavaScript-Test-Framework)
- // are still available for now.
- //
- // For new tests, using [Chai](https://chaijs.com/) is recommended.
- // You can use it by requiring:
Test.assertEquals(neg(1), -1,)- Test.assertSimilar(neg('x'), NaN)
- Test.assertEquals(neg('-13512.1111'),13512.1111)
getChange=(x,y)=>y-x
getChange=(__,_,___=100)=>(_=(_-__)*(__=___))?(~~_/__):_- getChange=(x,y)=>y-x
describe("Solution", function() { it("should test for something", function() { Test.assertEquals(getChange(4,10), 6); Test.assertEquals(getChange(4,100), 96); Test.assertEquals(getChange(4.5,100), 95.5); Test.assertEquals(getChange(3.5,5), 1.5); Test.assertEquals(getChange(4,5), 1); // assert.strictEqual(1 + 1, 2); }); });
- describe("Solution", function() {
- it("should test for something", function() {
- Test.assertEquals(getChange(4,10), 6);
- Test.assertEquals(getChange(4,100), 96);
- Test.assertEquals(getChange(4.5,100), 95.5);
- Test.assertEquals(getChange(3.5,5), 1.5);
Test.assertEquals(getChange(3.8,5), 1.2);- Test.assertEquals(getChange(4,5), 1);
- // assert.strictEqual(1 + 1, 2);
- });
- });