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
using System; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
int num = int.Parse(Console.ReadLine()); | |
int stars; | |
int loop; | |
if (num % 2 == 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
function solve() { | |
let bugs = [] | |
let id = 0 | |
function update() { | |
let element = $('#content') | |
element.empty() | |
for (let i = 0; i < bugs.length; i++) { | |
let a = $(`<div id="report_${bugs[i].ID}" class="report">`) | |
let b = $(`<div class="body">`) |
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
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Praktice | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
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 result() { | |
let arr = [] | |
return { | |
add:function (element) { | |
arr.push(element) | |
this.size++ | |
return arr.sort((a,b) =>{ | |
return a - b | |
}) | |
}, |
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 () { | |
String.prototype.isEmpty = function () { | |
return this == '' | |
} | |
String.prototype.ensureStart = function (str) { | |
if(this.startsWith(str)){ | |
return this.toString() | |
} else { |
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 result() { | |
let myObj = {} | |
myObj.extend = function (template) { | |
for (let a in template) { | |
if( typeof template[a] == 'function'){ | |
Object.getPrototypeOf(myObj)[a]=template[a] | |
} else { | |
myObj[a] = template[a] | |
} |
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 solve(a) { | |
let obj = this | |
let processor = (function() { | |
function upvote() { | |
obj.upvotes++ | |
} | |
function downvote() { | |
obj.downvotes++ |
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 solve(a,b) { | |
let processor = (function() { | |
function upvote(a) { | |
a.upvotes++ | |
} | |
function downvote(a) { | |
a.downvotes++ |
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
let s = (function() { | |
let obj = { | |
protein: 0, | |
carbohydrate: 0, | |
fat: 0, | |
flavour: 0 | |
} | |
return function solve(input) { |
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
let r = (function () { | |
let post | |
return function solve(obj,command) { | |
if(post == null){ | |
post = obj | |
if(command == 'upvote'){ |