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
## file one | |
## 1.23 | |
''' | |
в отличие от 25 и 26 задач тут уже идет обработка дичи на вводе | |
все "числа" которые питон не может обработать (если большое число или строка) | |
мы игнорируем, то есть строка "1 2 3 апы 1е10000 4 2" эквивалента строке "1 2 3 4 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
#include <iostream> | |
#include <string> | |
#include <fstream> | |
#include <io.h> | |
using namespace std; | |
int main() | |
{ | |
int flg = 0; //флаг. если =1 то файл с введенным названием был найден, иначе не найден и цикл повторяется |
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
def int_str(line) : #функция, которая считанную строку разделяет по прробелам и переделывает в список, при этом по возможности делает строку числом int, иначе оставляет строкой | |
line = line.split() | |
for i in range(len(line)) : | |
try : #попытка присвоить строку к int'у | |
line[i] = int(line[i]) | |
except ValueError : | |
line[i] = str(line[i]) | |
return line #возвращает полученный список | |
def STR(mas) : #функция. По заданному списку делает строку, разделяя элемнты пробелом и добавляя в конце перевод строки |
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 | |
for line in sys.stdin : | |
if line == "end\n" : | |
break | |
line_split = line.split() | |
line_split[4] = line_split[4].split(":")[0] | |
line_split[5] = line_split[5].split("/")[2] | |
s = line_split[5] + " " + line_split[1] + " " + line_split[2] + " " + line_split[3] + " " + line_split[4] + " " + line_split[0] | |
print(s) |
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
#include <iostream> | |
#include <fstream> | |
#include <math.h> | |
#include <vector> | |
using namespace std; | |
double Uo, w, B, S, R, J, to, t1, fo, h; | |
/* | |
#define Uo 10 |
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
#include <iostream> | |
#include <fstream> | |
#include <cmath> | |
using namespace std; | |
//parametres | |
double xo, yo, zo, b = 8/3, to, t1, eps; | |
int sigma = 10; |
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
#include <iostream> | |
#include <fstream> | |
#include <cmath> | |
using namespace std; | |
double B = 0.01, l = 1, E = 5, alpha = M_PI/4, m = 0.05, lambda = 0.1, g = 9.81, x0 = 0.1, dx0 = 0, t0 = 0, t1 = 20, eps = 0.1; | |
double func(double x, double dx) | |
{ |
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
#include <iostream> | |
#include <fstream> | |
#include <cmath> | |
using namespace std; | |
double g = 9.8, R, p0, p, z0, v0 = 0, t, eps; | |
double func(double z) | |
{ |
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 | |
class BotHandler: | |
def __init__(self, token): | |
self.token = token | |
self.api_url = "https://api.telegram.org/bot{}/".format(token) | |
def set_webhook(self): | |
method = "setwebhook" | |
params = {"url": } |
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
from math import pi | |
import numpy as np | |
import matplotlib.pyplot as plt | |
n = int(input()) | |
##generation | |
x = np.arange(0, 2*pi+0.1, 0.1) | |
array = [np.cos(i*x).tolist() for i in range(1, n+1, 1) ] | |
x = x.tolist() |
OlderNewer