Submission #72703788


Source Code Expand

#include <bits/stdc++.h>
using namespace std;
 
#define lli long long int
typedef pair<lli, lli> p;

const lli N = 200006;
const lli MOD = 1000000007;
const lli INF = 10e12+7;
//lli arr[N], seg[4*N], lazy_seg[4*N];
//lli k_search;
//priority_queue<p, vector<p>, greater<p>> pq;
//unordered_map<lli, vector<p>> gra;

void solve()
{
    lli i, ctr=0, n;
    string str;
    cin>>str;
    n=str.length();
    for(i=0;i<n;i++)
        if(str[i]=='i' || str[i]=='j')
            ctr++;
    cout<<ctr<<'\n';
}

void usaco()
{
	freopen("measurement.in","r",stdin);   
  	freopen("measurement.out","w",stdout);
}
 
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
    //usaco();
    lli t=1;
    //cin>>t;
    while(t--)
	    solve();
}

Submission Info

Submission Time
Task A - Count .
User Pesto
Language C++23 (GCC 15.2.0)
Score 100
Code Size 786 Byte
Status AC
Exec Time 2 ms
Memory 3632 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 16
Set Name Test Cases
Sample sample00.txt, sample01.txt, sample02.txt
All sample00.txt, sample01.txt, sample02.txt, testcase00.txt, testcase01.txt, testcase02.txt, testcase03.txt, testcase04.txt, testcase05.txt, testcase06.txt, testcase07.txt, testcase08.txt, testcase09.txt, testcase10.txt, testcase11.txt, testcase12.txt
Case Name Status Exec Time Memory
sample00.txt AC 2 ms 3404 KiB
sample01.txt AC 1 ms 3472 KiB
sample02.txt AC 1 ms 3504 KiB
testcase00.txt AC 1 ms 3632 KiB
testcase01.txt AC 1 ms 3544 KiB
testcase02.txt AC 1 ms 3460 KiB
testcase03.txt AC 1 ms 3632 KiB
testcase04.txt AC 1 ms 3428 KiB
testcase05.txt AC 1 ms 3500 KiB
testcase06.txt AC 1 ms 3472 KiB
testcase07.txt AC 1 ms 3428 KiB
testcase08.txt AC 1 ms 3524 KiB
testcase09.txt AC 1 ms 3472 KiB
testcase10.txt AC 1 ms 3428 KiB
testcase11.txt AC 1 ms 3428 KiB
testcase12.txt AC 1 ms 3544 KiB