This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print(readline().match(/\d+/g).reduce((p,c)=>p+(+c),0)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r=readline().split`` | |
console.log(String.fromCharCode(Math.round(r.reduce((p,c)=>{ | |
console.error(c, c.charCodeAt()) | |
return p+c.charCodeAt() | |
},0)/r.length))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import math | |
# Auto-generated code below aims at helping you parse | |
# the standard input according to the problem statement. | |
n = int(input()) | |
clos='' | |
mini=999999999 | |
for i in range(n): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r=readline;d=r();s=+r() | |
print(`____${'_|'[s]}____ | |
\\ / | |
\\ ${d} / | |
\\___/`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
host chatty | |
HostName url.cloudbla | |
User usernamebla |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f=n=>n<=-1?-1:n==0?1:n*f(n-1) | |
// f(5) => 120 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @param {string} s the sentence | |
* @returns {number} amount of double letter words in the given sentence | |
*/ | |
function doubleLetterWords(s) { | |
return s.split(' ').map(w => w.match(/(.)\1/m)?1:0).reduce((a,b)=>a+b) | |
} | |
// e.g | |
// doubleLetterWords("letter cool all rofl") => 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function decimalToReducedFraction(d) { | |
for(n=1;d*n%1!==0;n++); | |
return [d*n,n]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Config file for [Air](https://github.com/cosmtrek/air) in TOML format | |
[build] | |
exclude_dir = ["assets", "tmp", "vendor", "client/node_modules", "client"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:simple_animations/simple_animations/controlled_animation.dart'; | |
import 'package:simple_animations/simple_animations/multi_track_tween.dart'; | |
class FadeAnimation extends StatelessWidget { | |
final double delay; | |
final Widget child; | |
const FadeAnimation(this.delay, this.child); |