結果
問題 | No.2775 Nuisance Balls |
ユーザー |
|
提出日時 | 2024-06-08 13:15:47 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 638 bytes |
コンパイル時間 | 4,183 ms |
コンパイル使用メモリ | 247,608 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-27 21:32:03 |
合計ジャッジ時間 | 4,628 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
#include<bits/stdc++.h>using namespace std;using ll=long long;int main(){ll n;cin>>n;ll q,r;ll rest=n;vector<char> ans;q=rest/720;rest-=q*720;for(ll i=0;i<q;i++){ans.push_back('C');}q=rest/360;rest-=q*360;for(ll i=0;i<q;i++){ans.push_back('M');}q=rest/180;rest-=q*180;for(ll i=0;i<q;i++){ans.push_back('S');}q=rest/30;rest-=q*30;for(ll i=0;i<q;i++){ans.push_back('R');}q=rest/6;rest-=q*6;for(ll i=0;i<q;i++){ans.push_back('o');}for(ll i=0;i<rest;i++){ans.push_back('.');}for(char c:ans){cout<<c;}cout<<endl;}