日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

B. All the Vowels Please

發布時間:2023/12/9 编程问答 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 B. All the Vowels Please 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

題目鏈接:https://codeforces.com/contest/1166/problem/B

B. All the Vowels Please

time limit per test

1 second

memory limit per test

256 megabytes

input

standard input

output

standard output

Tom loves vowels, and he likes long words with many vowels. His favorite words are vowelly words. We say a word of length?kk?is vowelly if there are positive integers?nn?and?mm?such that?n?m=kn?m=k?and when the word is written by using?nn?rows and?mm?columns (the first row is filled first, then the second and so on, with each row filled from left to right), every vowel of the English alphabet appears at least once in every row and every column.

You are given an integer?kk?and you must either print a vowelly word of length?kk?or print??1?1?if no such word exists.

In this problem the vowels of the English alphabet are 'a', 'e', 'i', 'o' ,'u'.

Input

Input consists of a single line containing the integer?kk?(1≤k≤1041≤k≤104)?— the required length.

Output

The output must consist of a single line, consisting of a vowelly word of length?kk?consisting of lowercase English letters if it exists or??1?1?if it does not.

If there are multiple possible words, you may output any of them.

Examples

input

Copy

7

output

Copy

-1

input

Copy

36

output

Copy

agoeuioaeiruuimaeoieauoweouoiaouimae

Note

In the second example, the word "agoeuioaeiruuimaeoieauoweouoiaouimae" can be arranged into the following?6×66×6?grid:

It is easy to verify that every row and every column contain all the vowels.

?

思路:最最重要的,找出5*5的圖表,之后就按順序循環輸出即可。

?

a

e

i

o

u

a

e

i

o

u

a

e

i

o

u

a

e

i

o

u

a

e

i

o

u

a

e

i

o

u

a

e

i

o

u

a

?

代碼:

#include<iostream>#include<algorithm>#include<string>#include<cmath>using namespace std;int main(){int fla = 0;int m, n;int k;cin >> k;for (int i = 5; i <= sqrt(k); i++){if (k%i == 0){m = i;n = k / i;fla = 1;break;}}if (fla == 0)cout << -1;else{for (int i = 1; i <= m; i++){if (i % 5 == 1){for (int j = 1; j <= n; j++){if (j % 5 == 1)cout << "a";if (j % 5 == 2)cout << "e";if (j % 5 == 3)cout << "i";if (j % 5 == 4)cout << "o";if (j % 5 == 0)cout << "u";}}if (i % 5 == 2){for (int j = 1; j <= n; j++){if (j % 5 == 1)cout << "e";if (j % 5 == 2)cout << "i";if (j % 5 == 3)cout << "o";if (j % 5 == 4)cout << "u";if (j % 5 == 0)cout << "a";}}if (i % 5 == 3){for (int j = 1; j <= n; j++){if (j % 5 == 1)cout << "i";if (j % 5 == 2)cout << "o";if (j % 5 == 3)cout << "u";if (j % 5 == 4)cout << "a";if (j % 5 == 0)cout << "e";}}if (i % 5 == 4){for (int j = 1; j <= n; j++){if (j % 5 == 1)cout << "o";if (j % 5 == 2)cout << "u";if (j % 5 == 3)cout << "a";if (j % 5 == 4)cout << "e";if (j % 5 == 0)cout << "i";}}if (i % 5 == 0){for (int j = 1; j <= n; j++){if (j % 5 == 1)cout << "u";if (j % 5 == 2)cout << "a";if (j % 5 == 3)cout << "e";if (j % 5 == 4)cout << "i";if (j % 5 == 0)cout << "o";}}}}}

?

總結

以上是生活随笔為你收集整理的B. All the Vowels Please的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 亚洲精品a级 | 福利一区二区在线观看 | 中国老熟女重囗味hdxx | 国产精品三级视频 | 山外人精品影院 | 在线视频日韩欧美 | 国精产品乱码一区一区三区四区 | 波多野结衣视频播放 | av在线电影院 | 国产女主播一区 | 午夜高清 | 久久人人爽人人爽人人片av高清 | 欧美性理论片在线观看片免费 | 精品黑人一区二区三区 | 97视频精品| 日韩在线不卡 | 国产精品入口66mio男同 | 朝桐光在线视频 | 一级肉体全黄裸片 | 亚洲无毛 | 欧美日韩一区精品 | 欧美一级在线免费观看 | 毛片黄色一级 | 久久丫精品国产亚洲av不卡 | 加勒比在线免费视频 | 悠悠色在线 | 久久免费看毛片 | 国产免费自拍 | 久久国产视频播放 | 国产三级国产精品 | 香港三日本8a三级少妇三级99 | 精品亚洲永久免费精品 | 爱爱精品视频 | 久久只有精品 | 91入囗 | 日韩精品久久久久久 | 日本精品视频一区二区三区 | 黄色在线小视频 | 国产精品无码白浆高潮 | 黑人玩弄人妻一区二区三区四 | 一区二区三区四区五区在线视频 | 日色视频 | 亚州国产精品视频 | 一本久道综合色婷婷五月 | 亚洲最黄视频 | 99视频一区二区 | 久久久精品视 | 久久精品a | h网站免费在线观看 | 国产高潮呻吟久久 | 亚洲精品一线二线三线 | 欧美一级做 | 国产人人草 | 久久亚洲AV无码精品 | 久久嫩草| 国产91av在线播放 | 激情一级片 | 免费网站成人 | 日韩国产区 | 高清欧美性猛交xxxx黑人猛交 | 九色蝌蚪视频 | 国产无精乱码一区二区三区 | 国产毛片欧美毛片久久久 | 毛片毛片毛片毛片毛片毛片毛片 | 台湾极品xxx少妇 | 综合图区亚洲 | 国产精品色视频 | av影视在线观看 | 国产无遮挡一区二区三区毛片日本 | 五月天一区二区 | 国产欧美日韩综合精品 | 黄色影音 | 亚洲AV无码一区二区三区少妇 | 日本热久久 | 日韩一级精品 | 九九自拍偷拍 | 欧美精品亚洲精品日韩精品 | 中文字幕蜜桃 | 海角社区id:1220.7126,10. | 怎么可能高潮了就结束漫画 | 中国一级片黄色一级片黄 | 毛片直接看 | 国产精品入口日韩视频大尺度 | 色丁香av| 精品人妻一区二区三区日产 | 黄色欧美视频 | 黄色网页免费在线观看 | 亚洲av最新在线网址 | 国产一区二区三区视频免费在线观看 | 国产欧美一区二区三区沐欲 | 成人免费在线播放 | 日韩精品三级 | 极品销魂美女少妇尤物 | 极品少妇xxxx精品少妇偷拍 | 欧美亚洲图片小说 | 国内老熟妇对白xxxxhd | 99产精品成人啪免费网站 | 亚洲色图导航 | 巨乳xxx |