Untitled

 avatar
user_7248805
plain_text
3 years ago
293 B
3
Indexable
#include <iostream>
#include <string>
using namespace std;

int main()
{
	int n;
	int maxl = 0;
	cin >> n;
	string masS;
	for (int i = 0; i < n; i++) 
	{
		string s;
		cin >> s;
		int c = s.size();
		if (c > maxl) 
		{
			maxl = c;
			masS = s;
		}
	
	}
	cout << masS;
}
Editor is loading...