theme changed

This commit is contained in:
nik
2025-09-30 08:21:09 +03:00
parent 4c261f7def
commit 8bd93df2ae
917 changed files with 15023 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
using System;
class ArithmeticProgression : IProgression
{
private int a0;
private int b;
public ArithmeticProgression(int a0, int b)
{
this.a0 = a0;
this.b = b;
}
public int GetElement(int k)
{
return a0 + (k - 1) * b;
}
public int Sum(int n)
{
return (2 * a0 + (n - 1) * b) * n / 2;
}
}