A. Eleven
time limit per test :

1 second

memory limit per test: 

256 megabytes

input: 

standard input

output: 

standard output

Eleven wants to choose a new name for herself. As a bunch of geeks, her friends suggested an algorithm to choose a name for her. Eleven wants her name to have exactly n characters.

Her friend suggested that her name should only consist of uppercase and lowercase letters 'O'. More precisely, they suggested that the i-th letter of her name should be 'O' (uppercase) if i is a member of Fibonacci sequence, and 'o' (lowercase) otherwise. The letters in the name are numbered from 1 to n. Fibonacci sequence is the sequence f where

  • f1 = 1,
  • f2 = 1,
  • fn = fn - 2 + fn - 1 (n > 2).

As her friends are too young to know what Fibonacci sequence is, they asked you to help Eleven determine her new name.

Input

The first and only line of input contains an integer n (1 ≤ n ≤ 1000).

Output

Print Eleven's new name on the first and only line of output.

Examples
input
8
output
OOOoOooO
input
15
output
OOOoOooOooooOoo
 #include<bits/stdc++.h>
using namespace std; int FB[]; void init()
{
int t;
for(int i = ; i < ; i++)
FB[i] = ;
FB[] = FB[] = ;
for(int i = ; i < ;i++)
{ FB[i] = FB[i-] + FB[i-];
}
} int main()
{
init();
int n; while(~scanf("%d",&n))
{
int temp = ;
for(int i = ; i <= n; i++)
{
if(i == FB[temp])
{
printf("O");
temp++;
}
else
{
printf("o");
}
}
printf("\n");
}
return ;
}

Eleven的更多相关文章

  1. Eleven puzzle_hdu_3095(双向广搜).java

    Eleven puzzle Time Limit: 20000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) T ...

  2. Codeforces Round #459 (Div. 2)-A. Eleven

    A. Eleven time limit per test1 second memory limit per test256 megabytes Problem Description Eleven ...

  3. B - Eleven

    Problem description Eleven wants to choose a new name for herself. As a bunch of geeks, her friends ...

  4. python爬虫-携程-eleven参数

    携程-eleven分析 一.eleven的位置 通过对旁边栈的分析,它是在另一个js文件中调用的.那个js文件是一个自调用的函数,所以我们可以直接copy下来,用浏览器执行看看 执行运行是会报错的,u ...

  5. UVA 12672 Eleven(DP)

    12672 - Eleven Time limit: 5.000 seconds In this problem, we refer to the digits of a positive integ ...

  6. TIJ——Chapter Eleven:Holding Your Objects

    Java Provides a number of ways to hold objects: An array associates numerical indexes to objects. It ...

  7. Eleven scrum meeting 2015/11/5

    今日工作情况 小组成员 今日完成的工作 明日待做任务 唐彬 选课和退课模块 测试 赖彦谕 病情较重,请假 病情较重,请假 金哉仁 设计app logo 测试 闫昊 调整课程简介的展示效果 整合各个模块 ...

  8. 100-days: eleven

    Title: Facebook's live streaming(网络直播) is criticized(批评) after mosque(清真寺) shooting(枪击). live adj.现场 ...

  9. UVALive 6529 Eleven 区间dp

    题目链接:option=com_onlinejudge&Itemid=8&page=show_problem&problem=4540">点击打开链接 题意: ...

随机推荐

  1. Ubuntu16.04开机引导缺失Win10

    Ubuntu正常开机的情况下: sudo update-grub # 如果grub丢失, 就先sudo apt install grub Ubuntu不能正常开下: 进入Ubuntu引导, 不要正常进 ...

  2. [LeetCode] Largest Plus Sign 最大的加型符号

    In a 2D grid from (0, 0) to (N-1, N-1), every cell contains a 1, except those cells in the given lis ...

  3. [LeetCode] Coin Path 硬币路径

    Given an array A (index starts at 1) consisting of N integers: A1, A2, ..., AN and an integer B. The ...

  4. [LeetCode] Find Permutation 找全排列

    By now, you are given a secret signature consisting of character 'D' and 'I'. 'D' represents a decre ...

  5. 双边滤波算法的简易实现bilateralFilter

    没怎么看过双边滤波的具体思路,动手写一写,看看能不能突破一下. 最后,感觉算法还是要分开 水平 与 垂直 方向进行分别处理,才能把速度提上去. 没耐性写下去了,发上来,给大伙做个参考好了. 先上几张效 ...

  6. [HNOI 2008]越狱

    Description 监狱有连续编号为1...N的N个房间,每个房间关押一个犯人,有M种宗教,每个犯人可能信仰其中一种.如果 相邻房间的犯人的宗教相同,就可能发生越狱,求有多少种状态可能发生越狱 I ...

  7. 例10-5 uva12716

    题意:gcd(a,b) = a^b,( 1≤ a , b ≤ n) 思路: ① a^b = c, 所以 a^c = b,而且c是a的约数,枚举a,c,再gcd判断 ② 打表可知 a-b = c,而且a ...

  8. [Codeforces]871D Paths

    失踪OJ回归. 毕竟这样的数论没做过几道,碰上一些具体的应用还是无所适从啊.小C还是借助这题大致摸索一下莫比乌斯函数吧. Description 有n个点,标号为1~n,为这n个点建一张无向图.两个点 ...

  9. MYSQL 二进制安装

    系统环境:CentOs6.7 i386 Mysql版本:mysql-5.6.36 root登录linux cd pwd #/root/ wget http://mirrors.sohu.com/mys ...

  10. spring boot新建项目问题总结

    1.启动报:Unregistering JMX-exposed beans on shutdown 原因:以来的Tomcat没有启动 解决办法:在pom.xml加入依赖 <dependency& ...