Submission #23335


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include<iostream>
#include<stack>
#include<string>
using namespace std;
int main(){
stack<int>st;
string word;
int b;
while(1){
cin>>word;
if(word=="exit"){
break;
}
else if(word=="push"){
cin>>b;
st.push(b);
}
else if(word=="top"){
cout<<st.top()<<endl;
}
else if(word=="pop"){
st.pop();
}
}
return(0);
}

ステータス

項目 データ
問題 0600 - プログラミング入門:Stack
ユーザー名 ei1725
投稿日時 2017-07-27 11:56:06
言語 C++11
状態 Accepted
得点 1
ソースコード長 413 Byte
最大実行時間 468 ms
最大メモリ使用量 4136 KB

セット

セット 得点 Cases
1 ALL 1 / 1 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
Input01 AC 10 ms 480 KB
1
Input02 AC 13 ms 452 KB
1
Input03 AC 13 ms 424 KB
1
Input04 AC 15 ms 524 KB
1
Input05 AC 18 ms 492 KB
1
Input06 AC 38 ms 708 KB
1
Input07 AC 56 ms 860 KB
1
Input08 AC 149 ms 1432 KB
1
Input09 AC 316 ms 2696 KB
1
Input10 AC 468 ms 4136 KB
1