top of page

소스 코드 제출

공개·회원 50명

250413

/*

#include<stdio.h>

int s[100000], top=-1;

void push(int x)

{

top++;

s[top]=x;

}

int pop()

{

if(top!=-1)

{

top--;

}

return s[top+1];

}

int main ()

{

int k, a, b=0;

scanf("%d", &k);

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

{

scanf("%d", &a);

if(a!=0)

{

push(a);

}

else

{

pop();

}

}

while(top!=-1)

{

b+=pop();

}

//for(int j=0 ; j<=top ; j++)

//{

//b+=s[j];

//}

printf("%d", b);

return 0;

}

*/

/*

#include<stdio.h>

#include<string.h>

int s[50000]={}, top=-1;

void push(int x)

{

top++;

s[top]=x;

}

void pop()

{

if(top!=-1)

{

top=top-2;

}

}

int main ()

{

char a[50000];

scanf("%s", a);

for(int i=0 ; a[i]!=NULL ; i++)

{

push(a[i]);

if(top>0 && s[top-1]=='(' && s[top]==')')

{

pop();

}

}

if(top==-1)

{

printf("good");

}

else

{

printf("bad");

}

return 0;

}

*/

/*

#include<stdio.h>

char s[500];

int top=-1;

void push(char x)

{

top++;

s[top]=x;

}

int pop()

{

if(top!=-1)

{

top--;

}

return s[top+1];

}

int main ()

{

int n;

char m[201]={};

scanf("%d", &n);

scanf("%s", m);

for(int i=n-1 ; 0<=i ; i--)

{

push(m[i]);

if(top%4==2)

{

push(',');

}

}

while(top!=-1)

{

printf("%c", pop());

}

}

*/

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