阿诺语言版 (阿诺语言请参阅 https://github.com/lhartikk/ArnoldC)
程式码放在 https://gist.github.com/ronnywang/d1a1916f7292f7603a5a6722602443c4
要变更 n 的话可以改第 136 行的 changeMe 变量
会写这么长主要是因为阿诺语不支援 array 和 for
所以我必需要用 function 和 while 来模拟 for, array
关于这程式的逻辑我有补充在 gist comment
LISTEN TO ME VERY CAREFULLY check
I NEED YOUR CLOTHES YOUR BOOTS AND YOUR MOTORCYCLE arg1
I NEED YOUR CLOTHES YOUR BOOTS AND YOUR MOTORCYCLE arg2
GIVE THESE PEOPLE AIR
HEY CHRISTMAS TREE varFalse
YOU SET US UP @I LIED
HEY CHRISTMAS TREE varTrue
YOU SET US UP @NO PROBLEMO
HEY CHRISTMAS TREE arg1IsZero
YOU SET US UP varTrue
HEY CHRISTMAS TREE arg1Mod10
YOU SET US UP 0
HEY CHRISTMAS TREE arg1Mod10IsArg2
YOU SET US UP 0
HEY CHRISTMAS TREE newArg1
YOU SET US UP 0
HEY CHRISTMAS TREE result1
YOU SET US UP 0
GET TO THE CHOPPER arg1IsZero
HERE IS MY INVITATION arg1
YOU ARE NOT YOU YOU ARE ME 0
ENOUGH TALK
BECAUSE I'M GOING TO SAY PLEASE arg1IsZero
I'LL BE BACK varTrue
YOU HAVE NO RESPECT FOR LOGIC
GET TO THE CHOPPER arg1Mod10
HERE IS MY INVITATION arg1
I LET HIM GO 10
ENOUGH TALK
GET TO THE CHOPPER arg1Mod10IsArg2
HERE IS MY INVITATION arg1Mod10
YOU ARE NOT YOU YOU ARE ME arg2
ENOUGH TALK
BECAUSE I'M GOING TO SAY PLEASE arg1Mod10IsArg2
I'LL BE BACK varFalse
YOU HAVE NO RESPECT FOR LOGIC
GET TO THE CHOPPER newArg1
HERE IS MY INVITATION arg1
HE HAD TO SPLIT 10
ENOUGH TALK
GET YOUR ASS TO MARS result1
DO IT NOW check newArg1 arg2
I'LL BE BACK result1
HASTA LA VISTA, BABY
LISTEN TO ME VERY CAREFULLY getdigit
I NEED YOUR CLOTHES YOUR BOOTS AND YOUR MOTORCYCLE digit
I NEED YOUR CLOTHES YOUR BOOTS AND YOUR MOTORCYCLE current
I NEED YOUR CLOTHES YOUR BOOTS AND YOUR MOTORCYCLE pos
GIVE THESE PEOPLE AIR
HEY CHRISTMAS TREE n
YOU SET US UP 0
HEY CHRISTMAS TREE d
YOU SET US UP 0
HEY CHRISTMAS TREE isLessThan10
YOU SET US UP @NO PROBLEMO
HEY CHRISTMAS TREE isOver
YOU SET US UP 0
HEY CHRISTMAS TREE dIsNotZero
YOU SET US UP 0
HEY CHRISTMAS TREE nextVar
YOU SET US UP 0
HEY CHRISTMAS TREE nextPos
YOU SET US UP 0
STICK AROUND isLessThan10
GET YOUR ASS TO MARS d
DO IT NOW check current n
GET TO THE CHOPPER dIsNotZero
HERE IS MY INVITATION d
LET OFF SOME STEAM BENNET 0
ENOUGH TALK
BECAUSE I'M GOING TO SAY PLEASE dIsNotZero
GET TO THE CHOPPER isOver
HERE IS MY INVITATION pos
GET UP 1
YOU ARE NOT YOU YOU ARE ME digit
ENOUGH TALK
GET TO THE CHOPPER nextVar
HERE IS MY INVITATION current
YOU'RE FIRED 10
GET UP n
ENOUGH TALK
GET TO THE CHOPPER nextPos
HERE IS MY INVITATION pos
GET UP 1
ENOUGH TALK
BECAUSE I'M GOING TO SAY PLEASE isOver
TALK TO THE HAND nextVar
BULLSHIT
DO IT NOW getdigit digit nextVar nextPos
YOU HAVE NO RESPECT FOR LOGIC
YOU HAVE NO RESPECT FOR LOGIC
GET TO THE CHOPPER n
HERE IS MY INVITATION n
GET UP 1
ENOUGH TALK
GET TO THE CHOPPER isLessThan10
HERE IS MY INVITATION 10
LET OFF SOME STEAM BENNET n
ENOUGH TALK
CHILL
HASTA LA VISTA, BABY
IT'S SHOWTIME
HEY CHRISTMAS TREE changeMe
YOU SET US UP 3
DO IT NOW getdigit changeMe 0 0
YOU HAVE BEEN TERMINATED