import datetime
m = 12
d = 12
year = 2020
y2021 = datetime.date(year=2021, month=m, day=d)
for i in range(20):
year += 1
y = datetime.date(year=year, month=m, day=d)
da = datetime.datetime.isoweekday(y)
print(da)
if 7 == da :
print("Sunday")
print(y)
elif 6== da :
print("Saturday")
elif 5== da :
print("friaday")
elif 4== da:
print("Tuesday")
elif 3== da:
print("Wensday")
elif 2 == da:
print("Вторник")
elif 1 == da:
print("Monday")
Объяснение:
не так уж и трудно, если
program project2;
var
n,a,b,c,i,k,max,min: longint;
inp,outp: text;
begin
assign(inp,'input.txt');
reset(inp);
assign(outp,'output.txt');
rewrite(outp);
readln(inp,n);
max: =0;
min: =0;
c: =0;
for i: =1 to n do
read(f1,a);
if i=1 then
b: =a;
if a> max then
max: =a;
k: =a-c;
c: =a;
if k< 0 then
k: =abs(k);
min: =min+k;
if k> min then
min: =k;
end;
max: =max-b;
write(outp,max,' ',min);
close(inp);
close(outp);
end.
import datetime
m = 12
d = 12
year = 2020
y2021 = datetime.date(year=2021, month=m, day=d)
for i in range(20):
year += 1
y = datetime.date(year=year, month=m, day=d)
da = datetime.datetime.isoweekday(y)
print(da)
if 7 == da :
print("Sunday")
print(y)
elif 6== da :
print("Saturday")
print(y)
elif 5== da :
print("friaday")
print(y)
elif 4== da:
print("Tuesday")
print(y)
elif 3== da:
print("Wensday")
print(y)
elif 2 == da:
print("Вторник")
print(y)
elif 1 == da:
print("Monday")
print(y)
Объяснение:
не так уж и трудно, если
program project2;
var
n,a,b,c,i,k,max,min: longint;
inp,outp: text;
begin
assign(inp,'input.txt');
reset(inp);
assign(outp,'output.txt');
rewrite(outp);
readln(inp,n);
max: =0;
min: =0;
c: =0;
for i: =1 to n do
begin
read(f1,a);
if i=1 then
b: =a;
if a> max then
max: =a;
k: =a-c;
c: =a;
if k< 0 then
begin
k: =abs(k);
min: =min+k;
if k> min then
min: =k;
end;
end;
max: =max-b;
write(outp,max,' ',min);
close(inp);
close(outp);
end.