QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#606080 | #8248. Is Y a Vowel? | enze114514 | AC ✓ | 0ms | 3784kb | C++20 | 858b | 2024-10-02 21:59:56 | 2024-10-02 21:59:56 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define pb push_back
const ld pi = 3.14159265358979323846;
const int mod = (int)1e9 + 7;
const ll INF = 1e18;
template<typename T>
T chmax(T a, T b) {
return a > b ? a : b;
}
template<typename T>
T chmin(T a, T b) {
return a > b ? b : a;
}
const int N = (int)2e5 + 1, M = N * 2;
void solve(){
string s;
cin >> s;
int qwq = 0, owo = 0;
for(auto e : s){
if(e == 'a' || e == 'i' || e == 'e' || e == 'o' || e == 'u') qwq++;
if(e == 'y') owo++;
}
cout << qwq << " " << qwq + owo << endl;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(0);
int t = 1;
// cin >> t;
while(t--){
solve();
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3784kb
input:
asdfiy
output:
2 3
result:
ok single line: '2 3'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3556kb
input:
asdeyy
output:
2 4
result:
ok single line: '2 4'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3756kb
input:
y
output:
0 1
result:
ok single line: '0 1'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3560kb
input:
masiwbtuqcbhfebhiehrfynodgmdujstvivcamakuqsulxjfni
output:
14 15
result:
ok single line: '14 15'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3532kb
input:
hbbfiriglpvpzhqgloaezhbbduyeppuydieusencegnaoxigus
output:
17 19
result:
ok single line: '17 19'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3488kb
input:
qwerty
output:
1 2
result:
ok single line: '1 2'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3480kb
input:
yyyyy
output:
0 5
result:
ok single line: '0 5'
Test #8:
score: 0
Accepted
time: 0ms
memory: 3588kb
input:
asde
output:
2 2
result:
ok single line: '2 2'
Test #9:
score: 0
Accepted
time: 0ms
memory: 3540kb
input:
qwqwplkjhgfdsxncmnbvzxc
output:
0 0
result:
ok single line: '0 0'
Test #10:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
aiuoefgh
output:
5 5
result:
ok single line: '5 5'