結果
問題 | No.784 「,(カンマ)」 |
ユーザー | a |
提出日時 | 2020-04-09 17:09:08 |
言語 | C++14 (gcc 13.2.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 535 bytes |
コンパイル時間 | 1,605 ms |
コンパイル使用メモリ | 165,340 KB |
実行使用メモリ | 4,372 KB |
最終ジャッジ日時 | 2023-10-11 15:10:17 |
合計ジャッジ時間 | 2,286 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
4,352 KB |
testcase_01 | WA | - |
testcase_02 | AC | 1 ms
4,348 KB |
testcase_03 | AC | 2 ms
4,356 KB |
testcase_04 | AC | 2 ms
4,352 KB |
testcase_05 | AC | 2 ms
4,356 KB |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | AC | 1 ms
4,352 KB |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | AC | 2 ms
4,352 KB |
testcase_12 | WA | - |
ソースコード
/** * author: TakeruOkuyama * created: 2020-04-09 14:53:46 **/ #include <bits/stdc++.h> #define rep(i, n) for(int i = 0; i < (n); i++) using namespace std; using ll = long long; using P = pair<int, int>; int main(){ string N; cin >> N; rep(i, N.size()){ if(i + 1 != N.size()){ if((i + 1) % 3 == 0){ cout << N[i] << ","; }else{ cout << N[i]; } }else{ cout << N[i]; } } cout << endl; return 0;} /** **/