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 Prost(inpt: integer): boolean; | |
var | |
i: integer; | |
begin | |
Prost := true; //initially res of fuck is 1 | |
if inpt < 2 then //there arent prime nums that are less then 2 | |
Prost := false //so if input val is less than 2 then res of fuct is 0 | |
else | |
for i := 2 to inpt div 2 do //iterante over nums from 2 to half of the input val | |
if ((inpt mod i) = 0) then //if there isnt any remaind of division input num on present num from iteration |
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
random(b-a)+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
type | |
mas = array [1..100, 1..100] of longint; | |
procedure vvod( | |
var | |
k, kolstr, kolst: longint; | |
var |
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
type | |
mas = array[1..10000] of longint; | |
procedure vvod (var n :longint; var A :mas); | |
var | |
i :longint; | |
begin | |
readln (n); | |
for i:=1 to n do | |
read (A[i]); |
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
var | |
i, n, Place, lth, maxLth :longint; | |
room : array[1..9] of boolean; | |
begin | |
for i:=1 to 9 do | |
room[i]:=true; | |
readln (n); | |
for i:=1 to n do | |
begin | |
read (Place); |
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
type | |
pelment = ^telement; | |
telement = record | |
int:longint; | |
next:^telement; | |
end; | |
procedure push(var lr,rr:pelment; el:longint); | |
var |
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
n, m = map(int, input().split()) | |
mas = [] | |
sumin = 0 | |
sumout = 0 | |
massorted = [] | |
for i in range(n+m): | |
f = input() | |
ch = int(f[1:]) | |
if f[0] == '-': | |
mas.append(ch) |
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
competitors = [0] * (int(input())) | |
for election in map(int, input().split()): | |
if 0 < election <= len(competitors): | |
competitors[election - 1] += 1 | |
if len(competitors) > 0: | |
win_res = max(competitors) | |
else: | |
win_res = 0 | |
if win_res != 0: | |
for i in range(len(competitors)): |
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 <vector> | |
#include <string> | |
#include <algorithm> | |
#include <cmath> | |
#include <fstream> | |
#include <climits> | |
using namespace std; |
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 pygame as pg | |
FPS = 30 | |
W = 1000 | |
H = 1000 | |
R = 50 | |
menu = True |
OlderNewer