結果

問題 No.784 「,(カンマ)」
ユーザー Mcpu3
提出日時 2019-02-09 16:55:34
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 259 bytes
コンパイル時間 178 ms
コンパイル使用メモリ 29,312 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-01 19:14:23
合計ジャッジ時間 815 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <string.h>

int main(void)
{
	char N[11];
	scanf("%s", N);
	printf("%c", N[0]);
	int i, length = strlen(N);
	for (i = 1; i < length; ++i) {
		if (i % 3 == length % 3) printf(",");
		printf("%c", N[i]);
	}
	return 0;
}
0