import sys
input = sys.stdin.readline
A = list(map(int, input().split()))
print (sorted(A)[1])
import sys
input = sys.stdin.readline

N = int(input())
members = []
for _ in range(N):
    age, name = map(str, input().split())
    age = int(age)
    members.append((age, name))

members.sort(key=lambda x: x[0])
for i in members:
    print (*i)
word = input()
for i in range(0, 26):
    try:
        print (word.index(chr(97+i)), end = ' ')
    except:
        print (-1, end = ' ')
import sys
from collections import deque

stack = deque()
input = sys.stdin.readline
N = int(input())

for _ in range(N):
    N = int(input())

    if N != 0:
        stack.append(N)
    
    if N == 0:
        stack.pop()

print (sum(stack))
print (sum(map(int, input().split())))
#include <iostream>

using namespace std;

int main(void)
{
	cout << "강한친구 대한육군" << endl;
	cout << "강한친구 대한육군" << endl;
	
	return 0;
}
#include <stdio.h>

int main(void)
{
	int A, B, C = 0;
	
	scanf("%d %d %d", &A, &B, &C);
	
	if (A>=2 and B>=2 and C>=2)
	{
		if (A<=10000 and B<= 10000 and C<= 10000)
		{
			printf("%d\n", (A+B)%C);
			printf("%d\n", ((A%C) + (B%C))%C);
			printf("%d\n", (A*B)%C);
			printf("%d\n", ((A%C)*(B%C))%C);
		}
	}
	
	return 0;
}
#include <iostream>
// 역슬래시 
using namespace std;

int main(void)
{
	cout << "|\\_/|" << endl;
	cout << "|q p|   /}" << endl;
	cout << "( 0 )\"\"\"\\" << endl;
	cout << "|\"^\"`    |" << endl;
	cout << "||_/=\\\\__|" << endl;
}

 

#include <iostream>
// 역슬래시 
using namespace std;

int main(void)
{
	cout << "\\    /\\" << endl;
	cout << " )  ( ')" << endl;
	cout << "(  /  )" << endl;
	cout << " \\(__)|" << endl;
	
	return 0;	
}
# coding:utf-8
def is_adjacent(row):
    for x in range(row):
        # 열이 같음 or 대각선이 같음
        if (queen[x] == queen[row]) or (abs(queen[x] - queen[row]) == abs(row - x)):
            return False
    return True

def dfs(row):
    if row == N:
        global count
        count = count +1
        return 
        
    else:
        for i in range(N):
            queen[row] = i
            if is_adjacent(row):
                dfs(row+1)

if __name__ == "__main__":
    answer = [0, 1, 0, 0, 2, 10, 4, 40, 92, 352, 724, 2680, 14200, 73712, 365596]
    N = int(input())
    queen = [0] * N 
    count = 0
    #dfs(0)
    #print (count)
    print(answer[N])

+ Recent posts