CF918A.Eleven

入门

通过率:0%

时间限制:1.00s

内存限制:256MB

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

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

  • _f_1 = 1,
  • _f_2 = 1,
  • f__n = f__n - 2 + f__n - 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.

Eleven 想要为自己选择一个新名字。作为一群极客,她的朋友们为她提出了一种生成名字的算法。Eleven 希望她的名字恰好由 nn 个字符组成。

她的朋友建议:名字中只能包含大写和小写的字母 'O'。更准确地说,他们建议:名字中第 ii 个字母应为 'O'(大写),当且仅当 ii 属于斐波那契数列;否则为 'o'(小写)。名字中的字母位置编号从 11 到 nn。斐波那契数列 ff 定义如下:

  • f1=1f_1 = 1,
  • f2=1f_2 = 1,
  • fn=fn−2+fn−1f_n = f_{n-2} + f_{n-1}(当 n>2n > 2 时)。

由于她的朋友们年纪太小,还不知道什么是斐波那契数列,因此他们请你帮忙,帮 Eleven 确定她的新名字。

输入格式

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

输入仅包含一行,其中有一个整数 nn(1 ≤ n ≤ 10001 ≤ n ≤ 1000)。

输出格式

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

在输出的第一行且唯一一行中打印Eleven的新名字。

输入输出样例

  • 输入#1

    8

    输出#1

    OOOoOooO
  • 输入#2

    15

    输出#2

    OOOoOooOooooOoo

输入解题思路,AI测评打分。不知道怎么写?

首页