mirror of
https://github.com/tiennm99/codechef.git
synced 2026-06-10 12:10:46 +00:00
27 lines
420 B
C++
27 lines
420 B
C++
#include <iostream>
|
|
#include <string.h>
|
|
|
|
using namespace std;
|
|
|
|
int main()
|
|
{
|
|
int t;
|
|
cin >> t;
|
|
while (t--)
|
|
{
|
|
string s;
|
|
cin >> s;
|
|
int count = 0;
|
|
int l = s.length();
|
|
for (int i = 0; i < l; i++)
|
|
{
|
|
if (s[i] == '<' && s[i + 1] == '>')
|
|
{
|
|
count++;
|
|
}
|
|
}
|
|
cout << count << endl;
|
|
}
|
|
return 0;
|
|
}
|