結果
問題 | No.784 「,(カンマ)」 |
ユーザー |
![]() |
提出日時 | 2019-02-09 13:48:07 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 280 bytes |
コンパイル時間 | 1,234 ms |
コンパイル使用メモリ | 158,192 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-01 19:07:54 |
合計ジャッジ時間 | 1,828 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
#include <bits/stdc++.h> typedef long long ll; #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define REP(i,a) FOR(i,0,a) using namespace std; string s; int main(){ cin>>s; int n=(int)s.size(); REP(i,n){ if(i>0 && (n-i)%3==0){ cout<<','; } cout<<s[i]; } cout<<endl; }