結果
問題 |
No.1135 RPN
|
ユーザー |
![]() |
提出日時 | 2020-10-06 17:14:48 |
言語 | cLay (20241019-1) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 353 bytes |
コンパイル時間 | 2,379 ms |
コンパイル使用メモリ | 172,060 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-05 14:25:00 |
合計ジャッジ時間 | 2,524 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 |
ソースコード
int st[512]; int sp; { int n; rd(n); rep(n){ int c; c=my_getchar_unlocked(); if(c=='+'){ --sp; st[sp-1]+=st[sp]; my_getchar_unlocked(); }else if(c=='-'){ --sp; st[sp-1]-=st[sp]; my_getchar_unlocked(); }else{ int v=c-48; while(c=my_getchar_unlocked(),c>=48){ v=v*10+(c-48); } st[sp++]=v; } } wt(*st); }