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
class Tester { | |
private static List<String[]> tests = new ArrayList<>(); | |
public static void main(String[] args) { | |
tests.add(new String[]{"tan(45)", "1 1\n"}); | |
tests.add(new String[]{"tan(-45)", "-1 2\n"}); | |
tests.add(new String[]{"0.305", "0.3 0\n"}); | |
tests.add(new String[]{"0.3051", "0.31 0\n"}); | |
tests.add(new String[]{"(0.3051)", "0.31 0\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
package com.javarush.task.task03.task0306; | |
import javax.script.ScriptEngine; | |
import javax.script.ScriptEngineManager; | |
import javax.script.ScriptException; | |
import java.util.*; | |
import java.util.function.Function; | |
import java.util.regex.MatchResult; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; |
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
package com.javarush.task.task36.task3605; | |
import java.util.*; | |
import java.nio.file.*; | |
import java.io.*; | |
/* | |
Использование TreeSet | |
*/ | |
public class Solution { |
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 java.nio.file.*; | |
import java.util.*; | |
import java.util.stream.*; | |
public class Solution { | |
public static void main(String[] args) throws Exception { | |
Files.readAllLines(Paths.get(new Scanner(System.in).nextLine())).stream() | |
.mapToInt(Integer::parseInt) // String -> int | |
.filter(x -> x % 2 == 0) // лишаем только четные | |
.sorted() // сортируем |
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
const parseInt=(s,r=10)=>{const a=['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']; | |
const as=a.slice(0,r+1);let v=0,n=s[0]=='-';for (let i=n?1:0;i<s.length;i++)v=v*r+as.indexOf(s[i]);if(n)v*=-1;return v}; |
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
https://kit-pro.fontawesome.com/releases/v5.9.0/css/pro.min.css |
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 requests | |
from bs4 import BeautifulSoup as Parser | |
FILE = open('WEATHER', 'w') # Our output file | |
headers = { | |
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:45.0) Gecko/20100101 Firefox/45.0' # Mozilla Firefox (to avoid blocking) | |
} | |
def get_data(date): |
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
return (n<2) ? n : (fibonacci(n-1) + fibonacci(n-2)); |
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
Ukrainian_Time = { | |
'minute': 'хвилина', | |
'hour': 'година', | |
'second': 'секунда', | |
'minutes': 'хвилин', | |
'hours': 'годин', | |
'seconds': 'секунд', | |
} | |
Ukrainian_Time_Numbers = [ |
NewerOlder