Объяснение:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace example
{
class Program
{
static void Main(string[] args)
{
int x, answer1, answer2;
Console.Write("Введите x : ");
x = int.Parse(Console.ReadLine());
answer1 = 2*x+3*Convert.ToInt32(Math.Pow(x,2))-4*Convert.ToInt32(Math.Pow(x,3));
answer2 = 1+2*x+3*Convert.ToInt32(Math.Pow(x,2))+4*Convert.ToInt32(Math.Pow(x,3));
Console.WriteLine("Значение первого выражения : " + answer1);
Console.WriteLine("Значение второго выражения : " + answer2);
Console.ReadLine();
}
}
}
проф:
N = input()
a = [int(i) for i in input().split()]
for i in range(1, len(a), 2):
a[i - 1], a[i] = a[i], a[i - 1]
print(a)
или мое лоховское:
N= input()
s = []
a = [int(i) for i in input().split()]
for i in range(1, len(a), 2):
s.append(a[i])
s.append(a[i-1])
if len(a) % 2 != 0:
s.append(a[-1])
print(s)
Объяснение:
N нигде не используется