結果
問題 | No.784 「,(カンマ)」 |
ユーザー |
![]() |
提出日時 | 2019-02-09 14:11:11 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 281 bytes |
コンパイル時間 | 534 ms |
コンパイル使用メモリ | 56,020 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-01 19:10:22 |
合計ジャッジ時間 | 1,089 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
#include<iostream> using namespace std; string N; int main () { cin >> N; string t; int cnt = 0; for(int i=N.size()-1; i>=0; i--) { if(cnt % 3 == 0 && cnt > 0) t = ',' + t; t = N[i] + t; cnt++; } cout << t << endl; return 0; }