結果

問題 No.2775 Nuisance Balls
ユーザー elphe
提出日時 2024-07-15 18:05:35
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 417 bytes
コンパイル時間 585 ms
コンパイル使用メモリ 66,708 KB
最終ジャッジ日時 2025-02-23 15:47:21
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

#define NUM_OF(arr)   (sizeof(arr) / sizeof(*arr))

using namespace std;

int main()
{
	cin.tie(nullptr);
	ios::sync_with_stdio(false);

	int N, i;
	const int unit[] = { 720, 360, 180, 30, 6, 1 };
	const char letter[] = { 'C', 'M', 'S', 'R', 'o', '.' };
	cin >> N;

	for (i = 0; i != NUM_OF(unit); ++i)
	{
		while (N >= unit[i])
			cout << letter[i], N -= unit[i];
	}

	cout << '\n';
	return 0;
}
0