結果

問題 No.2775 Nuisance Balls
ユーザー Kei
提出日時 2024-06-07 21:57:44
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 336 bytes
コンパイル時間 3,962 ms
コンパイル使用メモリ 276,996 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-26 07:55:50
合計ジャッジ時間 5,043 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A = {720, 360, 180, 30, 6, 1};
  vector<char> C = {'C', 'M', 'S', 'R', 'o', '.'};
  int M = 6;
  string ans;
  for (int i = 0; i < M; i++) {
    while (N >= A[i]) {
      ans.push_back(C[i]);
      N -= A[i];
    }
  }
  cout << ans << endl;
}
0