結果
| 問題 | No.784 「,(カンマ)」 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-02-18 20:21:00 |
| 言語 | C++17 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 340µs | |
| コード長 | 239 bytes |
| 記録 | |
| コンパイル時間 | 1,070 ms |
| コンパイル使用メモリ | 209,608 KB |
| 実行使用メモリ | 9,864 KB |
| 最終ジャッジ日時 | 2026-10-11 15:26:21 |
| 合計ジャッジ時間 | 2,293 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main()
{
string num;
cin>>num;
int sub = num.length()%3;
for(auto i=1;i<=num.length();i++){
cout<<num[i-1];
if((i-sub)%3 == 0 && i!=num.length()){
cout<<',';
}
}
return 0;
}