/**#include<stdio.h>
#include<string.h>
char stack[300]={};
int top=0;
void push(char k)
{
if(top==300)
{
return;
}
stack[top]=k;
top++;
}
char pop()
{
if(top==0)
{
return 1;
}
else
{
top--;
return stack[top];
}
}
char sum;
int main()
{
int a,d=0;
char str[201]={};
scanf("%d %s",&a,str);
for(int i=a-1;i>=0;i--)
{
push(str[i]);
d++;
if(d%3==0 && d!=a)
{
push(',');
}
// push를 3 번하고 나서 ',' push ( 맨 마지막에는 x )
}
while(top!=0)
{
printf("%c",pop());
}
}**/
/**
#include<stdio.h>
int stack[100001]={};
int top=0;
int sum=0;
void push(int k)
{
stack[top]=k;
top++;
}
int pop()
{
top--;
return stack[top];
}
int main()
{
int a,d;
scanf("%d",&a);
for(int i=0;i<a;i++)
{
scanf("%d",&d);
if(d!=0)
push(d);
else
pop();
}
while(top!=0)
{
sum+=pop();
}
printf("%d",sum);
}
1. 왼쪽 매니지먼트에서 프로젝트 탭으로 들어간다.
2. 코드블럭스를 삭제하고 다시 설치한다.
3. 온라인 컴파일러를 이용한다 ( 구글에 c 컴파일러라고 치고 들어간다)
https://www.onlinegdb.com/online_c_compiler
**/
#include<stdio.h>
#include<string.h>
char stack[50001]={};
int main()
{
char str[50001]={};
int a;
}