top of page

소스 코드 제출

공개·회원 50명

20250801

#include <stdio.h>

int main()

{

int stack[100000] = {};

int top = 0;

int n,k,c,m,s;

scanf("%d",&n);

s=c;

for(top;top<n;top++) //stack에 숫자 입력

{

scanf("%1d",&c);

stack[top]=c;

}

m=n%3;

top=n;

if(m!=3&&n>2&&n%3!=0)

{

for(int i=0;i<m;i++)

{

printf("%d",stack[top]);

top--;

}

printf(",");

}

m=0;

for(s=top;s+1>0;s--)

{

if(m==3)

{

printf(",");

m=0;

}

printf("%d",stack[s]);

m++;

}

return 0;

}

3회 조회
주소 : 경기도 용인시 광교중앙로 302 블루 스퀘어 602호
연락처 : 031) 216 - 1546 ,     031) 215 - 1546
사업자등록번호 : 465-92-00916
​학원 등록 제 4603호
bottom of page