QOJ.ac

QOJ

حد الوقت: 2 s حد الذاكرة: 64 MB مجموع النقاط: 100

#23768. JOI og IOI

الإحصائيات

Oppgave

Skriv et program som teller hvor mange steder i en gitt streng $3$ påfølgende tegn danner henholdsvis JOI eller IOI. Strengen består kun av store engelske bokstaver. For eksempel, i strengen JOIOIOI vist i figuren nedenfor, forekommer JOI på $1$ sted og IOI på $2$ steder.

sample

Inndata

Inndataene består av $1$ linje som inneholder $1$ streng med høyst $10000$ store engelske bokstaver.

Utdata

Utdataene består av $2$ linjer: skriv ut antallet JOI funnet på linje $1$, og antallet IOI funnet på linje $2$.

Eksempler på inndata og utdata

Eksempel på inndata 1

JOIJOI

Eksempel på utdata 1

2
0

Eksempel på inndata 2

JOIOIOIOI

Eksempel på utdata 2

1
3

Eksempel på inndata 3

JOIOIJOINXNXJIOIOIOJ

Eksempel på utdata 3

2
3

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.