20251025
/*#include <stdio.h>
int first (int a,int b)
{
if (a/27==0)
{
return b;
}
b=
}
int main ()
{
char duf[27]="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
int i,fl,b;
long long int a;
scanf("%lld",&a);
if (a<=27)
{
printf ("%c",duf[a]);
}else
{
fl+=first(a,b);
}
}skip
*//*
/// x1,x2,y1,y2 == 아군 비행기
#include <stdio.h>
int main ()
{
int x1,y1,x2,y2,x3,y3;
scanf("%d %d %d %d %d %d",&x1,&y1,&x2,&y2,&x3,&y3);
}
*//*
#include <stdio.h>
int main ()
{
int a1,a2,a3,a4,b1,b2,b3,b4;
scanf ("%d %d %d %d %d %d %d %d",&a1,&a2,&a3,&a4,&b1,&b2,&b3,&b4);
if ()
{
printf ("");
}
else if (a1==b1||a1==b2||a1==b3||a1==b4||a2==b1||a2==b2||a2==b3||a2==b4||a3==b1||a3==b2||a3==b3||a3==b4||a4==b1||a4==b2||a4==b3||a4==b4)
{
printf ("POINT");
}
}*//*/
#include<stdio.h>
int topcoffee=-1;
int stack [444]={};
void push (int a)
{
topcoffee++;
stack[topcoffee]=a;
return;
}
int pop ()
{
// 스택이 비었는지!!!!!!!!!!
if(topcoffee==-1) return 0;
return stack[topcoffee--];
}
int main ()
{
push (4);
push (5);
printf ("%d\n",pop());
printf ("%d\n",pop());
printf ("%d\n",pop());
return 0;
}
*//*
#include<stdio.h>
int topcoffee=-1;
int stack [1000]={};
void push (int a)
{
topcoffee++;
stack[topcoffee]=a;
return;
}
int pop ()
{
// 스택이 비었는지!!!!!!!!!!
if(topcoffee==-1) return 0;
return stack[topcoffee--];
}
int main ()
{
int i,a,b;
scanf("%d",&a);
for (i=0;i<a;i++)
{
scanf ("%d",&b);
push (b);
}
while(top!=-1)
{
printf ("%d ",pop());
}
return 0;
}
*/
#include <stdio.h>
int top=-1;
int stack [200]={};
void push (int a)
{
top++;
stack[top]=a;
return;
}
int pop ()
{
if (top==-1)
{
return -1;
}return stack[top--];
}
int main ()
{
int a,b,i;
scanf ("%d",&a);
for (i=0;i<a;i++)
{
scanf ("%d",&b);
push (b);
}
while (top!=-1)
{
if (b==3)
{
b=0;
printf (",");
}
printf ("%d",pop());
b++;
}
}

