結果

問題 No.784 「,(カンマ)」
ユーザー shioya
提出日時 2019-02-18 20:19:01
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 232 bytes
コンパイル時間 1,643 ms
コンパイル使用メモリ 193,356 KB
最終ジャッジ日時 2025-01-06 21:13:43
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#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<<i;
		if((i-sub)%3 == 0 && i!=num.length()){
			cout<<',';
		}
	}
	return 0;
}
0