2017-05-26 12 views
0

私は1.4仕様書に書かれたこのlolcodeを解釈しようとしています。しかし、私はこのバージョンのための利用可能なインタプリタがないので、それを理解することはできません。私はSRSが何を意味しているのか分かりません。これは、今後登場するCTFの練習問題です。誰かが助けることができますか?LOLCODE 1.4の解釈

HAI 1.4 
CAN HAS STDIO? 

OBTW 
THIS IS A LOCK 
BY SHADY J DAWG 
TLDR 

O HAI IM TABLE 
I HAS A DAWG ITZ A YARN 
I HAS A CAT2 ITZ A NUMBR 
I HAS A DOG ITZ A NUMBR 
I HAS A KAT ITZ A NUMBAR 
I HAS A FELINE ITZ A YARN 
I HAS A KIT ITZ A NUMBAR 

DAWG R "CAT" 
DOG R 17 
CAT2 R 672 
FELINE R "A" 
KIT R 92 
KAT R 7 

HOW IZ I CAT YR NUM 
    I HAS A CAT3864 ITZ MAEK QUOSHUNT OF ME'Z CAT2 AN NUM A NUMBR 
    I HAS A A59CAT0 ITZ SRS SMOOSH ME'Z DAWG AN MAEK PRODUKT OF ME'Z KIT AN NUM A NUMBR MKAY 
    FOUND YR SRS SMOOSH ME'Z FELINE AN MAEK SUM OF NUM AN ME'Z DOG A YARN AN ME'Z DAWG AN MAEK MOD OF NUM AN ME'Z KAT A YARN MKAY 
IF U SAY SO 
KTHX 
I HAS A TABLES ITZ LIEK A TABLE 

O HAI IM MATH 
HOW IZ I POWERIN YR ABC AN YR DEF 
    BOTH SAEM DEF AN MAEK DEF A NUMBR, O RLY? 
     YA RLY 
     NO WAI 
      FOUND YR FAIL 
    OIC 
    I HAS A INDEX ITZ 0 
    I HAS A NUM ITZ ABC 
    IM IN YR HOUSE UPPIN YR INDEX TIL BOTH SAEM INDEX AN DEF 
     NUM R PRODUKT OF NUM AN SUM OF INDEX AN 1 
    IM OUTTA YR HOUSE 
    FOUND YR NUM 
IF U SAY SO 
KTHX 
I HAS A MATHS ITZ LIEK A MATH 

O HAI IM PILE 
I HAS A LENGTH ITZ 0 
I HAS A MAX ITZ -1 

HOW IZ I PUSHIN YR ITEM 

    DIFFRINT ME'Z MAX AN BIGGR OF ME'Z MAX AN ME'Z LENGTH, O RLY? 
     YA RLY, ME HAS A SRS ME'Z LENGTH ITZ ITEM, ME'Z MAX R SUM OF ME'Z MAX AN 1 
     NO WAI, ME'Z SRS ME'Z LENGTH R ITEM 
    OIC 
    ME'Z LENGTH R SUM OF ME'Z LENGTH AN 1 
IF U SAY SO 

HOW IZ I POPPIN 
    DIFFRINT ME'Z LENGTH AN 0, O RLY? 
    YA RLY 
     ME'Z LENGTH R DIFF OF ME'Z LENGTH AN 1 
     I HAS A ITEM ITZ ME'Z SRS ME'Z LENGTH 
     ME'Z SRS ME'Z LENGTH R NOOB 
     FOUND YR ITEM 
    OIC 
IF U SAY SO 

HOW IZ I GETTIN YR INDEX 
    BOTH SAEM INDEX AN SMALLR OF INDEX AN ME'Z LENGTH, O RLY? 
     YA RLY 
      I HAS A ITEM ITZ ME'Z SRS INDEX 
      FOUND YR ITEM 
    OIC 
IF U SAY SO 

HOW IZ I SIZIN 
    FOUND YR ME'Z LENGTH 
IF U SAY SO 
KTHX 

HOW IZ I CHECKIN YR P 
I HAS A C ITZ WIN 
BOTH SAEM P'Z LENGTH AN 3, O RLY? 
    YA RLY 
     BOTH SAEM SUM OF PRODUKT OF DIFF OF MAEK P IZ GETTIN YR 0 MKAY A NUMBR AN 3 AN 15 AN 43 AN QUOSHUNT OF QUOSHUNT OF 16807 AN 7 AN 7, O RLY? 
      YA RLY 
      NO WAI, C R FAIL 
     OIC 
     BOTH SAEM MATHS IZ POWERIN YR MAEK P IZ GETTIN YR 0 MKAY A NUMBR AN YR QUOSHUNT OF MAEK P IZ GETTIN YR 1 MKAY A NUMBAR AN MAEK P IZ GETTIN YR 0 MKAY A NUMBAR MKAY AN 16560, O RLY? 
      YA RLY 
      NO WAI, C R FAIL 
     OIC 
     BOTH SAEM TABLES IZ CAT YR P IZ GETTIN YR 2 MKAY MKAY AN 16, O RLY? 
      YA RLY 
      NO WAI, C R FAIL 
     OIC 
OIC 
FOUND YR C 
IF U SAY SO 

I HAS A PIN ITZ LIEK A PILE 

I HAS A NUMA ITZ A NUMBR 
VISIBLE "GIMMEH THE 1ST NUMBR" 
GIMMEH NUMA 
PIN IZ PUSHIN YR NUMA MKAY 

I HAS A NUMB ITZ A NUMBR 
VISIBLE "GIMMEH THE 2ND NUMBR" 
GIMMEH NUMB 
PIN IZ PUSHIN YR NUMB MKAY 

I HAS A NUMC ITZ A NUMBR 
VISIBLE "GIMMEH THE 3RD NUMBR" 
GIMMEH NUMC 
PIN IZ PUSHIN YR NUMC MKAY 

I HAS A LOCK ITZ A TROOF 
LOCK R I IZ CHECKIN YR PIN MKAY 
BOTH SAEM LOCK AN WIN, O RLY? 
YA RLY 
    VISIBLE "WIN!!!" 
    VISIBLE SMOOSH "THE FLAG IS: " AN MAEK PIN IZ GETTIN YR 0 MKAY A NUMBR AN MAEK PIN IZ GETTIN YR 1 MKAY A NUMBR AN MAEK PIN IZ GETTIN YR 2 MKAY A NUMBR MKAY 
OIC 

KTHXBYE 

答えて

1

Esolangs' pageより:

SRS [VAR]識別子として糸変数を解釈します。

コードサンプルは1.3ですが、ページは1.4用に更新されているようです。

私はLOLCODEに慣れていませんが、誤っていないと、YARN(文字列)変数の内容を識別子として使用して、可変インダイレクションを実装しています。