# data[].attributes.attachment_link.readable_text
#include<bits/stdc++.h>
#include<vector>
using namespace std;

struct Xu_ly
{
 		int n;
 		static int a[1000006];
 		
 		void sap_xep()
 		{
 	   		sort(a, a + n);
		}
		
		int ket_qua()
		{
			sap_xep();
			int d = 0, m = a[0], dtam = 0;
			for(int i = 0; i < n-1; i++)
			{
				if( a[i] == a[i+1] )
				{
					d++;
				}
				else if( d >= dtam  && a[i] < m) 
				{
					dtam = d;
					m = a[i];
				}
			}
			return m;
		}
		
 		private:
};

int main()
{
 	ifstream inp;
 	inp.open("hoithao.inp");
 	Xu_ly x;
 	inp>>x.n;
 	for(int i = 0; i < x.n; i++)
 	{
 		inp>>x.a[i];
	}
 	inp.close();
 	ofstream out;
 	out.open("hoithao.out");
	out<<x.ket_qua();
 	out.close();
 	return 0;
}

# data[].attributes.attachment_link.readable_text
#include<bits/stdc++.h>
#include<vector>
using namespace std;

struct Doan
{
	public:
		
		int n, d;
		static int a[1000006];
		pair<int, int> vt;
		
		int len(int l, int r)
		{
			return (r + 1) - (l + 1) + 1;
		}
		
		bool tim(int l, int r, int x)
		{
			for(int i = l; i < r; i++)
			{
				if(a[i] == x) return true;
			}
			return false;
		}
};

int main()
{
 	ifstream inp;
 	inp.open("bannha.inp");
// 	int n;
// 	static int a[1000006];
	Doan doan;
 	inp>> doan.n;
 	for(int i = 0; i < doan.n; i++)
 	{
 		inp>>doan.a[i];
	}
 	inp.close();
 	ofstream out;
 	out.open("bannha.out");
 	doan.d = 0;
 	doan.vt.first = 0;
 	int max = 0;
 	for(int i = 0; i < doan.n; i++)
 	{
 		if(doan.tim(doan.vt.first, i-1, doan.a[i]) && doan.len(doan.vt.first, i-1) > max)
 		{
 			doan.vt.second = i-1;
 			max = doan.len(doan.vt.first, doan.vt.second);
 			doan.vt.first = i;
		}
	}
	out<<max<<endl;
	out<<doan.vt.first<<" "<<doan.vt.second;
 	out.close();
 	return 0;
}

# data[].attributes.attachment_link.readable_text
#include <bits/stdc++.h>
using namespace std;

#define t1 a + abs(b) + abs(c)
#define t2 b + abs(a) + abs(c)
#define t3 c + abs(b) + abs(a)
#define t4 a + abs(c) + abs(b)
#define t5 b + abs(c) + abs(a)
#define t6 c + abs(a) + abs(b)

int main()
{
 	ifstream inp;
 	inp.open("bieuthuc.inp");
 	int a, b, c;
 	inp>>a>>b>>c;
 	inp.close();
 	ofstream out;
 	out.open("bieuthuc.out");
 	out<<max(t1, max(t2, max(t3, max(t4, max(t5, t6)))));
 	out.close();
 	return 0;
}

# data[].attributes.attachment_link.readable_text
#include <bits/stdc++.h>
#include <vector>
using namespace std;

int sumarr(vector<int> a, int x)
{
	int tong = 0;
	for(int i = 0; i < a.size(); i++)
	{
		if(a.at(i) != x) tong += a.at(i);
	}
	return tong;
}

int main()
{
    ifstream inp;
    inp.open("xoapt.inp");
    vector <int> a;
    int tam, n;
    inp>>n;
    for (int i = 0; i < n; i++)
    {
        inp>>tam;
        a.push_back(tam);
    }
    inp.close();
    ofstream out;
    out.open("xoapt.out");
    int d = 0;
    for(int i = 0; i<n; i++)
    {
    	if(sumarr(a, a[i]) % 2 == 0) d++;
	}
	out<<d;
//    for (int i = 0; i < n; i++)
//    {
//        out<<a[i];
//    }
    out.close();
    return 0;
}

# data[].attributes.attachment_link.readable_text
#include <bits/stdc++.h>
#include <vector>
using namespace std;

int main()
{
 	ifstream inp;
 	inp.open("uoc.inp");
 	long long n;
 	static long long a[500000000000];
 	inp>>n;
 	inp.close();
 	ofstream out;
 	out.open("uoc.out");
// 	vector<long long> a;
// 	a.clear();
 	long long i = 1, d = 0;
	while(i*i <= n)
	{
		if(n % i == 0) 
		{
			a[++d] = i;
			a[++d] = n/i;
		}
		i++;
	}
	sort(a+1, a + d+1);
	for(i = 1; i<=d; i++)
	{
		out<<a[i]<<endl;
	}
 	out.close();
 	return 0;
}

# data[].attributes.attachment_link.readable_text
#include <bits/stdc++.h>
using namespace std;

int main()
{
 	ifstream inp;
 	inp.open("uoc.inp");
 	long long n;
 	inp>>n;
 	inp.close();
 	ofstream out;
 	out.open("uoc.out");
 	for(int i = 1; i<=n/2; i++)
 	{
 		if(n % i == 0) out<<i<<endl;
	 }
	out<<n;
 	out.close();
 	return 0;
}

# data[].attributes.attachment_link.readable_text
#include <bits/stdc++.h>
#include <vector>
using namespace std;

int main()
{
 	ifstream inp;
 	inp.open("doiban.inp");
 	int n, m, k, tam, i = 0, j = 0;
 	vector<int> a, b;
 	inp>>n>>m>>k;
 	for(int i = 0; i<n; i++)
 	{
 		inp>>tam;
 		a.push_back(tam);
	}
	for(int i = 0; i<m; i++)
	{
		inp>>tam;
		b.push_back(tam);
	}
 	inp.close();
 	ofstream out;
 	out.open("doiban.out");
 	sort(a.begin(), a.end());
 	sort(b.begin(), b.end());
 	while(n-1 >= i)
 	{
 		if(b[j] - a[i] >= k)
 			{
 				out<<a[i]<<" "<<b[j]<<endl;
 				i++;
 				j++;
			}
			else j++;
	}
 	out.close();
 	return 0;
}

# data[].attributes.attachment_link.readable_text
#include <bits/stdc++.h>
using namespace std;

bool comp(const int a, const int b)
{
	return a>b;
}

int main()
{
 	ifstream inp;
 	inp.open("tongmax.inp");
 	int n;
 	static int a[10000000];
 	long long tong = 0;
 	inp>>n;
 	for(int i = 0; i<n; i++)
 	inp>>a[i];
 	inp.close();
 	ofstream out;
 	out.open("tongmax.out");
 	sort(a, a+n, comp);
 	if(a[0] <=0) tong = a[0];
 	else 
 	for(int i = 0; i<n; i++)
 	{
 		if(a[i] >0) tong+=a[i];
//		out<<a[i]<<" ";
	}
	out<<tong;
 	out.close();
 	return 0;
}

# data[].attributes.attachment_link.readable_text
#include <bits/stdc++.h>
using namespace std;

int main()
{
 	ifstream inp;
 	inp.open("tongn.inp");
 	int n;
	long long tong = 0;
 	inp>>n;
 	tong = n*(n+1)/2;
 	inp.close();
 	ofstream out;
 	out.open("tongn.out");
 	out<<tong;
 	out.close();
 	return 0;
}

# data[].attributes.attachment_link.readable_text
#include <bits/stdc++.h>
using namespace std;

int main()
{
 	ifstream inp;
 	inp.open("tongtich.inp");
 	long long a,b;
 	inp>>a>>b;
 	inp.close();
 	ofstream out;
 	out.open("tongtich.out");
 	out<<a+b<<endl;
 	out<<a*b;
 	out.close();
 	return 0;
}

# data[].attributes.body
TTHUONG

# data[].attributes.attachment_link.readable_text
#include<iostream>
#include<fstream>
#include<algorithm>
using namespace std;

long long k, a[3], b[3];

int main()
{
	ifstream inp;
	inp.open("tromvang.inp");

	inp>>k;
	for(int i = 0; i<3; i++)
	{
		inp>>a[i];
	}
	inp.close();
	ofstream out;
	out.open("tromvang.out");
	long long CUM[7];
	CUM[0] = a[0] + a[1] + a[2]; 
	CUM[1] = a[1] + a[2]; 
	CUM[2] = a[2]; 
	CUM[3] = a[0] + a[1]; 
	CUM[4] = a[0]; 
	CUM[5] = a[0] + a[2];
	CUM[6] = a[1];
//	if(CUM[0] > k) CUM[0] = 0;
//	else if(CUM[1] > k) CUM[1] = 0;
//	else if(CUM[2] > k) CUM[2] = 0;
//	else if(CUM[3] > k) CUM[3] = 0;
//	else if(CUM[4] > k) CUM[4] = 0;
//	else CUM[5] = 0;
//	out<<max(max(max(max(max(CUM[0], CUM[1]), CUM[2]), CUM[3]), CUM[4]),CUM[5]);
	for(int i = 0; i<7; i++)
	{
		if(CUM[i] > k) CUM[i] = 0;
	}
	sort(CUM, CUM + 7);
	out<<CUM[6];
	out.close();
	return 0;
}


# data[].attributes.attachment_link.readable_text
#include<iostream>
#include<fstream>
using namespace std;

int main()
{
	ifstream inp;
	inp.open("xhh.inp");
	int n, m, a[10000];
	inp>>n>>m;
	for(int i = 0; i<n; i++)
	{
		inp>>a[i];
	}
	inp.close();
	ofstream out;
	out.open("xhh.out");
	int d = a[0], sx = 0;
	for(int i = 1;i<=n;i++)
	{
		if(d >= m)
		{
			d = a[i-1];
			sx++;
		}
		d+= a[i];
		if(i == n-1&& d != 0) sx++;
	}
	out<<sx;
	out.close();
	return 0;
}

# data[].attributes.attachment_link.readable_text
#include<iostream>
#include<fstream>
#include<string>
using namespace std;

int val(char c)
{
	return (int)c-48;
}

string str(int s)
{
	char ss[2];
	sprintf(ss,"%d",s);
	return (string)ss;
}

void daixau(string &st1, string &st2)
{
	if(st1.length()>st2.length()) for(int i = 0; i< st1.length()-st2.length();i++) st2 = '0' +st2;
	else for(int i = 0; i< st2.length()-st1.length();i++) st1 = '0' +st1;
}

string xuli(string st1,string st2)
{
	string t = "";
	int c,sodu = 0,s;
	for(int i = st1.length()-1; i>=0;i--)
	{
		c = val(st1[i]) + val(st2[i]) + sodu;
		t = str(c % 10) + t;
		sodu = c / 10;
	}
	if(sodu > 0) t = str(sodu) + t;
	return t;
}

int main()
{
	ifstream inp;
	inp.open("tong.inp");
	int m,n;
	inp>>m>>n;
	string st1, st2, st = "";
	inp>>st1;
	inp>>st2;
	inp.close();
	ofstream out;
	out.open("tong.out");
	daixau(st1,st2);
	out<<xuli(st1,st2).length()<<endl;
	out<<xuli(st1,st2);
	out.close();
	return 0;
}


# data[].attributes.attachment_link.readable_text
#include<iostream>
#include<fstream>
#include<string>
using namespace std;

int main()
{
	ifstream inp;
	inp.open("thecd.inp");
	int t,a[7],kq;
	char c;
	string st;
	inp>>st;
	for(int i = 0; i< st.length();i++)
	{
		c = st[i];
		a[i] = (int)c-48;
	}
	inp.close();
	ofstream out;
	out.open("thecd.out");
	t = a[0]*2+a[1]*7+a[2]*6+a[3]*5+a[4]*4+a[5]*3+a[6]*2;
	kq = t % 11;
	switch(kq)
	{
		case 0: 
		{
			out<<'J';
			break;
		}
		case 1: 
		{
			out<<'A';
			break;
		}
		case 2: 
		{
			out<<'B';
			break;
		}
		case 3: 
		{
			out<<'C';
			break;
		}
		case 4: 
		{
			out<<'D';
			break;
		}
		case 5: 
		{
			out<<'E';
			break;
		}
		case 6: 
		{
			out<<'F';
			break;
		}
		case 7: 
		{
			out<<'G';
			break;
		}
		case 8: 
		{
			out<<'H';
			break;
		}
		case 9: 
		{
			out<<'I';
			break;
		}
		case 10: 
		{
			out<<'Z';
			break;
		}
		default: out<<"LOI!!";
	}
	out.close();
	return 0;
}

