-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1166B.cpp
More file actions
41 lines (40 loc) · 826 Bytes
/
1166B.cpp
File metadata and controls
41 lines (40 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
int f=1;
int i;
for(i=5;i<n/2;i++){
if(n%i==0){
f=0;
break;
}
}
if(f || n/i<5)
{
cout<<-1;return 0;}
char a[i][n/i];
int l=n/i;
int j=i;
// cout<<l<<" "<<j<<" "<<i<<"\n";
char c[]={'a','e','o','i','u'};
for(int i=0;i<j;i++){
for(int j1=0;j1<5;j1++){
a[i][j1]=c[(j1+i)%5];
// cout<<a[i][j1]<<"p";
}
//cout<<"\n";
}
for(int i=0;i<j;i++){
for(int j1=5;j1<l;j1++){
a[i][j1]=c[(j1+i)%5];
}
}
for(int i=0;i<j;i++){
for(int j1=0;j1<l;j1++){
cout<<a[i][j1]<<"";
}
//cout<<"\n";
}
}