A
#include <stdio.h>
int main()
{
    int a, s = 0;
    while ((a = getchar()) != '\n')
        s += a-'0';
    printf("%d\n", s);
}
B
#include <stdio.h>
int main()
{
    int a, b, c;
    scanf("%d%d%d", &a, &b, &c);
    printf("%d\n", (a<b)^(a<c) ? a : (a<b)^(c<b) ? b : c);
}
D
#include <stdio.h>
int main()
{
    int n;
    scanf("%d", &n);
    printf("%d\n", (n*n-n)/2+1);
}
E
#include <algorithm>
#include <cmath>
#include <cstdio>
using namespace std;
#define SQR(a) ((a)*(a))
#define DIST(a, b) sqrt(SQR(x##a-x##b)+SQR(y##a-y##b))
int main()
{
    double x1, y1, x2, y2, x3, y3, e1, e2, e3, t;
    scanf("%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3);
    e1 = DIST(2, 3); e2 = DIST(1, 3); e3 = DIST(1, 2);
    if (e1 > e2) swap(e1, e2);
    if (e2 > e3) swap(e2, e3);
    if (e1 > e2) swap(e1, e2);
    if (e3-e1-e2 > 1E-5) puts("Invalid Input");
    else
    {
        t = e1*e1+e2*e2-e3*e3;
        puts(fabs(t) < 1E-5 ? "Right Triangle" : t < 0 ? "Obtuse Triangle" : "Acute Triangle");
    }
}
#include <stdio.h>
int main()
{
    int a, s = 0;
    while ((a = getchar()) != '\n')
        s += a-'0';
    printf("%d\n", s);
}
B
#include <stdio.h>
int main()
{
    int a, b, c;
    scanf("%d%d%d", &a, &b, &c);
    printf("%d\n", (a<b)^(a<c) ? a : (a<b)^(c<b) ? b : c);
}
D
#include <stdio.h>
int main()
{
    int n;
    scanf("%d", &n);
    printf("%d\n", (n*n-n)/2+1);
}
E
#include <algorithm>
#include <cmath>
#include <cstdio>
using namespace std;
#define SQR(a) ((a)*(a))
#define DIST(a, b) sqrt(SQR(x##a-x##b)+SQR(y##a-y##b))
int main()
{
    double x1, y1, x2, y2, x3, y3, e1, e2, e3, t;
    scanf("%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3);
    e1 = DIST(2, 3); e2 = DIST(1, 3); e3 = DIST(1, 2);
    if (e1 > e2) swap(e1, e2);
    if (e2 > e3) swap(e2, e3);
    if (e1 > e2) swap(e1, e2);
    if (e3-e1-e2 > 1E-5) puts("Invalid Input");
    else
    {
        t = e1*e1+e2*e2-e3*e3;
        puts(fabs(t) < 1E-5 ? "Right Triangle" : t < 0 ? "Obtuse Triangle" : "Acute Triangle");
    }
}