QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#792203#8248. Is Y a Vowel?lukamosiashvili#AC ✓0ms3852kbC++17399b2024-11-29 06:04:052024-11-29 06:04:06

Judging History

你现在查看的是最新测评结果

  • [2024-11-29 06:04:06]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:3852kb
  • [2024-11-29 06:04:05]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

int main(){
    ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
    string s;
    cin >> s;

    int a = 0, b = 0;
    for(int i = 0; i < s.size(); i++){
        if(s[i] == 'a' || s[i] == 'u' || s[i] == 'i' || s[i] == 'o' || s[i] == 'e') a++;
        if(s[i] == 'y') b++;
    }

    cout << a << " " << a + b;
    return 0;
}

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3612kb

input:

asdfiy

output:

2 3

result:

ok single line: '2 3'

Test #2:

score: 0
Accepted
time: 0ms
memory: 3840kb

input:

asdeyy

output:

2 4

result:

ok single line: '2 4'

Test #3:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

y

output:

0 1

result:

ok single line: '0 1'

Test #4:

score: 0
Accepted
time: 0ms
memory: 3548kb

input:

masiwbtuqcbhfebhiehrfynodgmdujstvivcamakuqsulxjfni

output:

14 15

result:

ok single line: '14 15'

Test #5:

score: 0
Accepted
time: 0ms
memory: 3852kb

input:

hbbfiriglpvpzhqgloaezhbbduyeppuydieusencegnaoxigus

output:

17 19

result:

ok single line: '17 19'

Test #6:

score: 0
Accepted
time: 0ms
memory: 3836kb

input:

qwerty

output:

1 2

result:

ok single line: '1 2'

Test #7:

score: 0
Accepted
time: 0ms
memory: 3608kb

input:

yyyyy

output:

0 5

result:

ok single line: '0 5'

Test #8:

score: 0
Accepted
time: 0ms
memory: 3808kb

input:

asde

output:

2 2

result:

ok single line: '2 2'

Test #9:

score: 0
Accepted
time: 0ms
memory: 3492kb

input:

qwqwplkjhgfdsxncmnbvzxc

output:

0 0

result:

ok single line: '0 0'

Test #10:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

aiuoefgh

output:

5 5

result:

ok single line: '5 5'