var a: integer;
begin
Randomize;
a := 100 + Random(900);
Writeln(a);
while (a > 0) and (a mod 2 = 0) do a := a div 10;
if a = 0 then
Write('да')
else
Write('нет')
end.
Где только находят такие задачи О_о ну вот :)
uses crt;
type auto=record
nom:string;
sht:integer;
end;
var f,g:text;
a:array[1..100] of auto;
s,s1:string;
n,k,i,j,c,p,r:integer;
x:auto;
begin
clrscr;
assign(f,'input.txt');
reset(f);
assign(g,'output.txt');
rewrite(g);
read(f,n);
readln(f,s);
readln(f,s);
k:=1;
a[k].nom:=copy(s,1,8);
delete(s,1,9);
val(s,a[k].sht,c);
for i:=2 to n do
begin
readln(f,s);
s1:=copy(s,1,8);
delete(s,1,9);
val(s,r,c);
p:=0;
j:=1;
while(j<=k) and(p=0) do
if s1=a[j].nom then
begin
p:=j;
a[p].sht:=a[p].sht+r
end
else j:=j+1;
if p=0 then
begin
k:=k+1;
a[k].nom:=s1;
a[k].sht:=r;
end;
end;
close(f);
for i:=1 to k-1 do
for j:=i+1 to k do
if a[i].sht<a[j].sht then
begin
x:=a[i];
a[i]:=a[j];
a[j]:=x;
end;
for i:=1 to k do
begin
writeln(g,a[i].nom,' ',a[i].sht);
writeln(a[i].nom,' ',a[i].sht);
end;
close(g);
end<span>.</span>
С++
#include<iostream>
using namespace std;
main()
{
int a, s;
cin >> a;
for(int i = 15; i <= a; i++)
s += i;
cout << s;
}
Python
a = int(input())
s = 0
for i in range(15, a + 1):
s += i
print(s)
Pascal
var a, s, i: integer;
begin
read(a);
for i := 15 to a do s += i;
write(s);
end.
Я уж забывать эту тему стал,
Дано:
I = 1.5 Кб
K = 3072
Найти: N — ?
Решение:
I = I/K
N=2i
I= 1,5Кб = 1,5 • 1024 • 8 = 12 288 бит.
I = 12288/3072 = 4 бита
N = 24 =16 символов