結果

問題 No.2775 Nuisance Balls
ユーザー forest3
提出日時 2024-07-04 13:18:14
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 431 bytes
コンパイル時間 1,880 ms
コンパイル使用メモリ 168,776 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-04 13:18:19
合計ジャッジ時間 3,463 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

using ll = long long;
#define rep(i, n) for(int i = 0; i < n; i++)

int main() {
	int N;
	cin >> N;
	using P = pair<char, int>;
	vector<P> p{{'C', 720}, {'M', 360}, {'S', 180}, {'R', 30}, {'o', 6}, {'.', 1}};
	int sz = p.size();
	string ans;
	rep(i, sz) {
		char c = p[i].first;
		int n = p[i].second;
		int d = N / n;
		ans += string(d, c);
		N -= d * n;
	}
	cout << ans << endl;
}

0