Codeforces 918A Eleven

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/polanwind/article/details/88097718
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <math.h>
#include <string>
#include <algorithm>
#include <vector>

using namespace std;

int n;
bool vis[1005];

int main() {
	vis[1] = true;
	int a = 1;
	int b = 1;
	int temp = 2;
	while (temp <= 1000) {
		vis[temp] = true;
		temp = temp + a;
		a = temp - a;
	}
	scanf("%d", &n);
	for (int i = 1;i <= n;++i) {
		if (vis[i]) {
			printf("O");
		}
		else {
			printf("o");
		}
	}
	return 0;
}

猜你喜欢

转载自blog.csdn.net/polanwind/article/details/88097718
今日推荐