让我们进行单词搜索!


35

在这一挑战中,我们将共同创建一个单词搜索,其中包含许多使用不同语言的程序。

我以60 x 25的空格(·)网格开始,其中一些被Ruby程序的字符替代。

要回答,请选择一种尚未使用的语言。使用您选择的语言,编写一个程序,该程序将从控制台读取字符,标记,行所有输入,然后进行打印。然后,将您的程序插入单词搜索中。

例如,假设您选择Python 3作为答案,然后编写程序print(input())。现在,您必须将该程序插入到网格中。

如果答案前的网格如下所示:

···a·24··········
··z····t·········

然后,您可以将程序放在第二行,与现有代码重叠t

···a·24··········
··zprint(input())

请注意,您可以沿任何方向放置程序:向前,向后,向上,向下或对角线,只要它在一条直线上即可。

但是,如果现有网格看起来像这样:

···a·24··········
··z····q·········

print(input())在不更改现有字符的情况下,无法适应此处,这是禁止的。相反,您可以更改程序:

print(
 input())

这个两行程序非常适合:

···a·24·print(···
··z····q input())

在这里,您将空格(·)替换为空格()。但是,空格与其他任何字符一样,并且不能在以后的程序中覆盖。

就像单线一样,多行程序可以在任何方向放置。例如,在较大的网格中,可以通过顺时针旋转程序135°来执行以下操作。

··········
········ ·
·······i·p
······n·r·
·····p·i··
····u·n···
···t·t····
··(·(·····
·)········
)·········

计分

每个答案的分数是30除以添加的字符数。即使您自己使用它们,也不要计算网格中已经存在的字符。

您的总分数是所有答案的分数总和乘以答案数量。最高分获胜。

规则

  • 每个答案必须用不同的语言编写。仅版本号不同的语言(例如,Python 2和Python 3)被认为是相同的。
  • 每个答案都必须以最近的有效答案为基础。也就是说,以最新的此类答案的网格为例,然后将程序插入其中。
  • 要插入程序,请使用·您选择的字符替换至少一个空格()。您可以在答案中使用网格中的现有字符,但不能更改或移动它们中的任何一个。
  • 在所有答案中,您总共不能插入500个字符以上。
  • 您插入的所有字符都必须是程序的一部分。
  • 您的程序可能只包含可打印的ASCII和换行符,但可能没有两个或多个连续的背对背连续换行符。
  • 换行符不会计入您的分数。
  • 需要完整的程序,而不仅仅是功能或代码段。
  • 同一用户不能写两个连续的答案。
  • 如果某人的答案违反规则,请发表评论。如果30分钟后仍未解决错误,则应将其删除。

二手语言片段

这是由ETHproductions,FryAmTheEggman和Mauris制作的堆栈片段,用于跟踪用户的得分和使用的语言。它最初是从MartinBüttner的惊人模板中复制

原始排行榜:

新版(实验版),使用修改后的公式:

为确保您的提交内容被摘要识别,请使用以下标头模板:

# Language, X characters added

2
恩,我只是依靠社区足够酷,不要做一些无聊的事情:)
Lynn

5
我有一个基本的“排行榜”代码段,它是从Martin惊人的模板复制而来的,可以跟踪所用的语言。我可以将其编辑到帖子中吗?
ETHproductions's

1
好了,我已经添加了代码段。我只删除了不必要的HTML部分,因此可以随意缩短CSS或JS。
ETHproductions 2015年

2
我建议下次有人进行类似的操作时,将其限制为仅能显着显示Wikipedia条目的语言或类似的语言。感觉好像不是一个真正的单词搜索,它具有数十种从未听说过的,来自深奥语言的1-2个字符的条目。
ThaddeusB 2015年

3
有人应该将代码片段扩展到排行榜,列出每个作者的分数。
林恩

Answers:


12

Java,添加了124个字符

虽然还有空间!

class C{public static void main(String[]a) throws Throwable{
System.out.println(new java.util.Scanner(System.in).next());
}}

现在网格

····························································
···········i········a·······································
··········?pio;·····l·······································
··········,u········e·······································
··········.t········r·······································
··········@s········t·······································
··········· ··printf(·······································
···········g··    input('','s'))····························
···········e·····n··r·······································
········write(read-host)····································
·········E·s········m·······································
········C·E·········p·······································
·······H·T··········t·····················r·················
······O· ···········(·······································
····· ·/············)·······································
····%·P·············)·······································
···A· ······················································
··%·A·······················································
···=························································
{elbaworhT sworht )a][gnirtS(niam diov citats cilbup{C ssalc    
;))(txen.)ni.metsyS(rennacS.litu.avaj wen(nltnirp.tuo.metsyS    
··························································}}
····························································
····························································
····························································

进行忍者编辑并反转网格中的代码,因为OP指出代码可以向后。然后将其改装成下一个答案


11

腮腺炎,添加了23个字符

再次抱歉缺少问题中的一项要求。

这是我的新作品:

s t=" " r t#50:20 w !,t,!

这会将t变量设置为一个空格,然后从标准输入中读取最多50个字符,超时20秒,然后写一个换行符,变量,然后再写一个换行符。(如果您不这样做的话,许多腮腺炎患者会有点混乱...)

网格现在是:

····························································
···········i········a·······································
··········?pio;·····l·······································
··········,u········e·······c·······························
··········.t········r·······a·······························
··········@s······s t=" " r t#50:20 w !,t,!·················
··········· ··printf(·······(·······························
···········g··    input('','s'))····························
···········e·····n··r·······c·······························
········write(read-host)····a·······························
·········E·s········m·······n·······························
········C·E·········p·······(·······························
·······H·T··········t·······,·············r·················
······O· ···········(·······'·······························
····· ·/············)·······'·······························
····%·P·············)·······)·······························
···A· ······················)·······························
··%·A·······················································
···=························································
{elbaworhT sworht )a][gnirtS(niam diov citats cilbup{C ssalc    
;))(txen.)ni.metsyS(rennacS.litu.avaj wen(nltnirp.tuo.metsyS    
··························································}}
····························································
····························································
····························································

糟糕的R提交使这很难编写... :-)


10

Beatnik,添加29个字符

Get a chr!
Outputs it
and 'BZam.

说明即将到来:)

在5个
chr以下的乱码中获得#忽略 #得分8,输入一个字符并推入其值
输出 #得分9,弹出一个数字并输出其字符
,并 #在
5'BZam以下的得分被忽略 #得分17终止程序

新网格

·········v---H\·············································
·········>qir@uH····a·······································
Get a chr!?pio;·····l·······································
Outputs it,u········e·······c·······························
and 'BZam..t········r·······a·······························
··········@s······s t=" " r t#50:20 w !,t,!·················
··········· ··printf(·······(·······························
···········g··    input('','s'))····························
···········e·····n··r·······c·······························
········write(read-host)····a·······························
·········E·s········m·······n·······························
········C·E·········p·······(·······························
·······H·T··········t·······,·············r·················
······O· ···········(·······'·······························
····· ·/············)·······'·······························
····%·P·············)·······)·········1·····················
···A· ······················)········n······················
··%·A·······························-·······················
···=······························· ···$·d··················
{elbaworhT sworht )a][gnirtS(niam diov citats cilbup{C ssalc    
;))(txen.)ni.metsyS(rennacS.litu.avaj wen(nltnirp.tuo.metsyS    
································e···a·····················}}
·······························h···=························
··································<·························
·································>··························

我认为B'Zam应该是'BZam,因为中间的撇号使它成为两个词。'BZam将获得17分并终止该计划。此外,有人可能会认为这是无效的,因为口译员可能会嘲笑您获得低分的“ get a”,“ it”和“ and”。我认为这很好。
Mike Bufardeci 2015年

@MikeBufardeci我认为您在BZam上可能是正确的。由于它不会影响下一个答案,因此会有所变化
MickyT 2015年

9

C,添加27个字符

有人提到C,我发现它仍然是可能的。

main( ){printf("%c",  (getchar()));}

新网格:

·········v---H\·············································
······,··>qir@uH···IaP.·····································
Get a chr!?pio;·····l·······································
Outputs it,u········e·······c··········print(readline())····
and 'BZam..t········r·······a·······························
········~,@s······s t=" " r t#50:20 w !,t,!·················
······main( ){printf("%c",  (getchar()));}··················
···········g·>    input('','s'))····························
···········e·····n··r·······c·········g·····················
·······(write(read-host)····a)········r······ ··············
·······))E·s········m·······n)········e·····················
········C·E·········p·······((·······{print;exit}····K······
·······H·T··········t·······,t········ ···r·················
······O· ···········(·······'u········-·····················
····· ·/············)·······'p········m·····················
····%·P·············)·······)n········1·····················
···A· ······················)io······n ·····················
··%·A························(······-·.·····················
···=·························t\···· ···$·d··················
{elbaworhT sworht )a][gnirtS(niam diov citats cilbup{C ssalc
;))(txen.)ni.metsyS(rennacS.litu.avaj wen(nltnirp.tuo.metsyS
·····························r··e···a b c d e f g h i·····}}
·····························p·h···=b c d e f g h i·········
··································<·························
·································>··························

8

??? ,添加了1个字符

?!

网格现在是:

·········v---H\·············································
·········>qir@uH····a·······································
·········!?pio;·····l·······································
··········,u········e·······c·······························
··········.t········r·······a·······························
··········@s······s t=" " r t#50:20 w !,t,!·················
··········· ··printf(·······(·······························
···········g··    input('','s'))····························
···········e·····n··r·······c·······························
········write(read-host)····a·······························
·········E·s········m·······n·······························
········C·E·········p·······(·······························
·······H·T··········t·······,·············r·················
······O· ···········(·······'·······························
····· ·/············)·······'·······························
····%·P·············)·······)·········1·····················
···A· ······················)········n······················
··%·A·······························-·······················
···=······························· ···$·d··················
{elbaworhT sworht )a][gnirtS(niam diov citats cilbup{C ssalc    
;))(txen.)ni.metsyS(rennacS.litu.avaj wen(nltnirp.tuo.metsyS    
································e···a·····················}}
·······························h···=························
··································<·························
·································>··························

6

,添加3个字符

(:::)

新的网格:

·········v---H\··v+C+<D_··············S·P··············;····
G`····,··>qir@uH·  IaP.C·············A·USE: io·········>····
Get a chr!?pio;····Ol···············Y·Lreadln(write(···;····
Outputs it,u········e·······c······ ·L·print(readline())····
and 'BZam..t········r·······a·····ai ··string))··<v;i:j;p:j·
G·······~,@s······s t=" " r t#50:20 w !,t,!······?a?·:·E····
G·····main( ){printf("%c",  (getchar()));}·······pr>·:·;····
O·········)g·>    input('','s'))·················h_··)·P····
a··········e·····n··r·····^·c·········g··········pd····;····
·······(write(read-host)····a)········r·input n$!?u····(····
·······))E·s········m·······n)···KVGH·e·print n$!·m····;····
········C·E·········p·······((···TIIA{print;exit}·pYEK·*····
$'main'H·T··········t·······,t···HSMI· ···r·······(·········
 \/\··O· ···········(·······'u···XIM ·-···········$·········
  \/· ·/(println····)·······'p···BBE1·m···········a·········
   \%·PQ  (read-line))······)n···YLH.·1···········r·········
   A\     /-io-\············)io··EE 4n ·····`·····g·········
  % A\-e-<     |·············(···· V-·.··di _r(a)·v·········
 $ =      \----#·············t\···V ···$;di $a····)·········
{elbaworhT sworht )a][gnirtS(niam diov citats cilbup{C ssalc
;))(txen.)ni.metsyS(rennacS.litu.avaj wen(nltnirp.tuo.metsyS
·····························r··e···a b c d e f g h i·····}}
···········>maertsoi<edulcni#p·h···=b c d e f g h i·········
····;s gnirts::dts{)(niam tni····v<   o<····················
···};s<<tuoc::dts;s>>nic::dts····>i:1+?/;···················

5

Ruby,添加了9个字符

puts gets

网格现在是:

····························································
····························································
···········p················································
···········u················································
···········t················································
···········s················································
··········· ················································
···········g················································
···········e················································
···········t················································
···········s················································
····························································
····························································
····························································
····························································
····························································
····························································
····························································
····························································
····························································
····························································
····························································
····························································
····························································
····························································

5

LISP,添加了3个字符

(write(read
))

新的网格:

·········v---H\·············································
·········>qir@uH····a·······································
Get a chr!?pio;·····l·······································
Outputs it,u········e·······c·······························
and 'BZam..t········r·······a·······························
··········@s······s t=" " r t#50:20 w !,t,!·················
··········· ··printf(·······(·······························
···········g··    input('','s'))····························
···········e·····n··r·······c·······························
·······(write(read-host)····a)······························
·······))E·s········m·······n)······························
········C·E·········p·······((······························
·······H·T··········t·······,t············r·················
······O· ···········(·······'u······························
····· ·/············)·······'p······························
····%·P·············)·······)n········1·····················
···A· ······················)i·······n······················
··%·A························(······-·······················
···=·························t····· ···$·d··················
{elbaworhT sworht )a][gnirtS(niam diov citats cilbup{C ssalc
;))(txen.)ni.metsyS(rennacS.litu.avaj wen(nltnirp.tuo.metsyS
·····························r··e···a·····················}}
·····························p·h···=························
··································<·························
·································>··························

5

Perl,添加了6个字符

die
$  a=<>

网格现在是:

·········v---H\·············································
·········>qir@uH····a·······································
··········?pio;·····l·······································
··········,u········e·······c·······························
··········.t········r·······a·······························
··········@s······s t=" " r t#50:20 w !,t,!·················
··········· ··printf(·······(·······························
···········g··    input('','s'))····························
···········e·····n··r·······c·······························
········write(read-host)····a·······························
·········E·s········m·······n·······························
········C·E·········p·······(·······························
·······H·T··········t·······,·············r·················
······O· ···········(·······'·······························
····· ·/············)·······'·······························
····%·P·············)·······)·······························
···A· ······················)·······························
··%·A·······················································
···=···································$·d··················
{elbaworhT sworht )a][gnirtS(niam diov citats cilbup{C ssalc    
;))(txen.)ni.metsyS(rennacS.litu.avaj wen(nltnirp.tuo.metsyS    
····································a·····················}}
···································=························
··································<·························
·································>··························

您的对角程序错误。查看135度旋转示例。您将需要有一条空白的对角线。
mbomb007'9

@ mbomb007啊,我认为应该修复。
ThaddeusB 2015年

您已从网格中删除了先前的答案:)
MickyT 2015年

@MickyT感谢您的编辑。:)
ThaddeusB 2015年

5

Quipu,添加了3个字符

Quipu中的cat程序是四个字符:

\/
/\

我将这个角度旋转了90°,然后重新使用了Rail程序中的斜线之一。

新的网格:

·········v---H\··v+C+<D_··············S·P··············;····
G`····,··>qir@uH·  IaP.C·············A·USE: io·········>····
Get a chr!?pio;····Ol···············Y·Lreadln(write(···;····
Outputs it,u········e·······c······ ·L·print(readline())····
and 'BZam..t········r·······a·····ai ··string))··<v;···;····
G·······~,@s······s t=" " r t#50:20 w !,t,!······?a?···E····
G·····main( ){printf("%c",  (getchar()));}·······pr>···;····
O··········g·>    input('','s'))·················h_····P····
a··········e·····n··r·····^·c·········g··········pd····;····
·······(write(read-host)····a)········r·input n$!?u····(····
·······))E·s········m·······n)···KVGH·e·print n$··m····;····
········C·E·········p·······((···TIIA{print;exit}·pYEK·*····
$'main'H·T··········t·······,t···HSMI· ···r·······(·········
 \/\··O· ···········(·······'u···XIM ·-···········$·········
  \/· ·/(println····)·······'p···BBE1·m···········a·········
   \%·P·  (read-line))······)n···YLH.·1···········r·········
   A\     /-io-\············)io··EE 4n ·····`·····g·········
  % A\-e-<     |·············(···· V-·.··di _r(a)·v·········
 $ =      \----#·············t\···V ···$;di $a····)·········
{elbaworhT sworht )a][gnirtS(niam diov citats cilbup{C ssalc
;))(txen.)ni.metsyS(rennacS.litu.avaj wen(nltnirp.tuo.metsyS
·····························r··e···a b c d e f g h i·····}}
···········>maertsoi<edulcni#p·h···=b c d e f g h i·········
····;s gnirts::dts{)(niam tni·····<·························
···};s<<tuoc::dts;s>>nic::dts····>··························

5

Marbelous,添加了7个字符

00
\\/\]]

(如果我正确理解了Marbelous的工作方式...)

·········v---H\OIv+C+<D_··············S·P··············;····
G`····,··>qir@uH·  IaP.C········LAMBDA·USE: io·········>····
Get a chr!?pio;····Ol···········ZEROY·Lreadln(write(···;····
Outputs it,u········e·······c······ ·L·print(readline())····
and 'BZam..t········r·······a·····ai ··string))·o<v;i:j;p:j·
G·······~,@s······s t=" " r t#50:20 w !,t,!······?a?·:·E····
G·····main( ){printf("%c",  (getchar()));}·······pr>·:·;····
O·········)g·>    input('','s'))·················h_··)·P····
a··········e·····n··r·····^·c·········g··········pd····;····
·······(write(read-host)····a)········r·input n$!?u····(····
·······))E·s········m·······n)···KVGH·e·print n$!·m····;····
········C·E·········p·······((···TIIA{print;exit}·pYEK·*····
$'main'H·TUPTUO·····t·00····,t···HSMI· ···r·······(·········
 \/\··O· ·TUPNI···S (I\\/\]]'u···XIM ·-···········$·········
  \/· ·/(println··FO) /·····'p···BBE1·m···········a·········
   \%·PQ  (read-line))······)n···YLH.·1··print(io.read())···
   A\     /-io-\············)io··EE 4n ····,`·····g·········
  % A\-e-<     |··········)#_(···· V-·.··di _r(a)·v·········
 $ =      \----#·············t\·c&V ···$;di $a····)·········
{elbaworhT sworht )a][gnirtS(niam diov citats cilbup{C ssalc
;))(txen.)ni.metsyS(rennacS.litu.avaj wen(nltnirp.tuo.metsyS
··`[x.````?10xx][x.````?10xx]r··e···a b c d e f g h i·····}}
···········>maertsoi<edulcni#p·h···=b c d e f g h i·········
····;s gnirts::dts{)(niam tni····v<   o<····················
···};s<<tuoc::dts;s>>nic::dts···o>i:1+?/;][gnirtStupnI@tnirP

由于您只需要读取一个字符,因此00\n]]也应该这样做。
马丁·恩德

确实。我忘记了阅读单个字符是可能的。
plannapus

4

Pyth,添加了1个字符

w

网格现在是:

····························································
····························································
··········?pio··············································
··········,u················································
··········.t················································
···········s················································
··········· ················································
···········g················································
···········e················································
········w··t················································
···········s················································
····························································
····························································
····························································
····························································
····························································
····························································
····························································
····························································
····························································
····························································
····························································
····························································
····························································
····························································

4
w__t_我看你在那儿做了什么
PurkkaKoodari 2015年

@ Pietu1998必须提前计划!不希望它像hello world的进化一样快地转移到esolangs:^)
FryAmTheEggman 2015年

4

PowerShell,添加了14个字符

write(read-host)

我会很好,给人们更多的呼吸空间。:)

现在网格

····························································
···········i················································
··········?pio;·············································
··········,u················································
··········.t················································
···········s················································
··········· ················································
···········g················································
···········e················································
········write(read-host)····································
···········s················································
····························································
··········································r·················
····························································
····························································
····························································
····························································
····························································
····························································
····························································
····························································
····························································
····························································
····························································
····························································

啊,错过了
Patrick Roberts

4

ALGOL 68,添加了7个字符

print(read 
string)

新的网格:

·········v---H\········································;····
······,··>qir@uH···IaP.················USE: io·········>····
Get a chr!?pio;·····l··················readln··········;····
Outputs it,u········e·······c··········print(readline())····
and 'BZam..t········r·······a··········string)·········;····
········~,@s······s t=" " r t#50:20 w !,t,!············E····
······main( ){printf("%c",  (getchar()));}·············;····
···········g·>    input('','s'))·······················P····
···········e·····n··r·······c·········g················;····
·······(write(read-host)····a)········r·input n········(····
·······))E·s········m·······n)········e·print n········;····
········C·E·········p·······((·······{print;exit}····K·*····
·······H·T··········t·······,t········ ···r·················
······O· ···········(·······'u········-·····················
····· ·/············)·······'p········m·····················
····%·P·············)·······)n········1·····················
···A· ······················)io······n ·····················
··%·A························(······-·.·····················
···=·························t\···· ···$·d··················
{elbaworhT sworht )a][gnirtS(niam diov citats cilbup{C ssalc
;))(txen.)ni.metsyS(rennacS.litu.avaj wen(nltnirp.tuo.metsyS
·····························r··e···a b c d e f g h i·····}}
·····························p·h···=b c d e f g h i·········
··································<·························
·································>··························

4

LOLCODE,已添加31个字符

HAI 1.4
GIMMEH V
VISIBLE V
KTHXBYE

恰好位于中间的右侧,旋转了90 o。对接了很好的对抗-以及d在那里。在这之间,批处理文件和PowerShell中,我很确定我不会基于积分赢得胜利。:-)

网格现在是:

·········v---H\··v+C+<D_··············S·P··············;····
G`····,··>qir@uH·  IaP.C·············A·USE: io·········>····
Get a chr!?pio;····Ol···············Y·Lreadln(write(···;····
Outputs it,u········e·······c······ ·L·print(readline())····
and 'BZam..t········r·······a·····ai ··string))··<v;···;····
G·······~,@s······s t=" " r t#50:20 w !,t,!······?a?···E····
G·····main( ){printf("%c",  (getchar()));}·······pr>···;····
O··········g·>    input('','s'))·················h_····P····
a··········e·····n··r·····^·c·········g··········pd····;····
·······(write(read-host)····a)········r·input n$!?u····(····
·······))E·s········m·······n)···KVGH·e·print n$··m····;····
········C·E·········p·······((···TIIA{print;exit}·pYEK·*····
·······H·T··········t·······,t···HSMI· ···r·······(·········
······O· ···········(·······'u···XIM ·-···········$·········
····· ·/(println····)·······'p···BBE1·m···········a·········
····%·P·  (read-line))······)n···YLH.·1···········r·········
···A· ······················)io··EE 4n ·····`·····g·········
··%·A························(···· V-·.··di _r(a)·v·········
·$·=·························t\···V ···$;di $a····)·········
{elbaworhT sworht )a][gnirtS(niam diov citats cilbup{C ssalc
;))(txen.)ni.metsyS(rennacS.litu.avaj wen(nltnirp.tuo.metsyS
·····························r··e···a b c d e f g h i·····}}
·····························p·h···=b c d e f g h i·········
··································<·························
·································>··························

(我还纠正了自下而上的第四行)


4

Prolog(SWI),添加了14个字符

:-get(C),
put(C).

读取单个字符并输出。在Ideone上,这有效,但输出到stderr。随着swiplUbuntu上,它执行以下操作:

dlosc@dlosc:~/tests$ swipl -qs getput.prolog
|: X
X?-

X输入的字符在哪里,?-是提示。您可以使用Ctrl-D退出提示。

新网格(代码从右上角从上到下,从右到左读取):

·········v---H\OIv+C+<D_··············S·Psgv···········;····
G`····,··>qir@uH·  IaP.C········LAMBDA·USE: io·········>····
Get a chr!?pio;p···Ol···········ZEROY·Lreadln(write(···;····
Outputs it,u··a$ ohce·······c······ ·L·print(readline())····
and 'BZam..t···a daer·······a·····ai ··string))·o<v;i:j;p:j·
G·······~,@s······s t=" " r t#50:20 w !,t,!······?a?·:·Eu-··
G·····main( ){printf("%c",  (getchar()));}·······pr>·:·;tg··
O·········)g·>    input('','s'))·················h_··)·P(e··
a··········e·····n··r·····^·c·········g··········pd····;Ct··
·······(write(read-host)····a)········r·input n$!?u····()(··
·······))E·s········m·······n)···KVGH·e·print n$!·m····;.C··
········C·E·········p·······((···TIIA{print;exit}·pYEK·*·)··
$'main'H·TUPTUO·····t·00····,t···HSMI· ···r·······(······,··
 \/\I^O= ·TUPNI···S (I\\/\]]'u···XIM ·-···········$·········
  \/· ·/(println··FO) /·····'p···BBE1·m···········a·········
   \%·PQ  (read-line))······)n···YLH.·1··print(io.read())···
   A\     /-io-\············)io··EE 4n ··@.,`·····g·········
  % A\-e-<     |··········)#_(···· V-·.··di _r(a)^v·········
 $ =      \----#·············t\·c&V ···$;di $a····)·········
{elbaworhT sworht )a][gnirtS(niam diov citats cilbup{C ssalc
;))(txen.)ni.metsyS(rennacS.litu.avaj wen(nltnirp.tuo.metsyS
··`[x.````?10xx][x.````?10xx]r··e···a b c d e f g h i·····}}
···········>maertsoi<edulcni#p·h···=b c d e f g h i·········
····;s gnirts::dts{)(niam tni····v<   o<····················
···};s<<tuoc::dts;s>>nic::dts···o>i:1+?/;][gnirtStupnI@tnirP

4

尾码,添加了1个字符

ROYALr

新网格:

·········v---H\OIv+C+<D_··············S·Psgv···········;····
G`····,··>qir@uH·  IaP.C········LAMBDA·USE: io·········>····
Get a chr!?pio;p···Ol···········ZEROYALreadln(write(···;····
Outputs it,u··a$ ohce·······c······ ·L·print(readline())····
and 'BZam..t···a daer·······a·····ai ··string))·o<v;i:j;p:j·
G·······~,@s······s t=" " r t#50:20 w !,t,!······?a?·:·Eu-··
G·····main( ){printf("%c",  (getchar()));}·······pr>·:·;tg··
O·········)g·>    input('','s'))·················h_··)·P(e··
a··········e·····n··r·····^·c·········g··········pd····;Ct··
·······(write(read-host)····a)········r·input n$!?u····()(··
·······))E·s········m·······n)···KVGH·e·print n$!·m····;.C··
········C·E·········p·······((···TIIA{print;exit}·pYEK·*·)··
$'main'H·TUPTUO·····t·00····,t···HSMI· ···r·······(······,··
 \/\I^O= ·TUPNI···S (I\\/\]]'u···XIM ·-···········$·········
  \/· ·/(println··FO) /·····'p···BBE1·m···········a·········
   \%·PQ  (read-line))······)n···YLH.·1··print(io.read())···
   A\     /-io-\············)io··EE 4n ··@.,`·····g·········
  % A\-e-<     |··········)#_(···· V-·.··di _r(a)^v·········
 $ =      \----#·············t\·c&V ···$;di $a····)·········
{elbaworhT sworht )a][gnirtS(niam diov citats cilbup{C ssalc
;))(txen.)ni.metsyS(rennacS.litu.avaj wen(nltnirp.tuo.metsyS
··`[x.````?10xx][x.````?10xx]r··e···a b c d e f g h i·····}}
···········>maertsoi<edulcni#p·h···=b c d e f g h i·········
····;s gnirts::dts{)(niam tni····v<   o<····················
···};s<<tuoc::dts;s>>nic::dts···o>i:1+?/;][gnirtStupnI@tnirP

3

迷宫,添加1个字符

,.@

读取和写入字符。

现在网格

····························································
···········i········a·······································
··········?pio;·····l·······································
··········,u········e·······································
··········.t········r·······································
··········@s········t·······································
··········· ··printf(·······································
···········g··    input('','s'))····························
···········e·····n··r·······································
········write(read-host)····································
·········E·s········m·······································
········C·E·········p·······································
·······H·T··········t·····················r·················
······O· ···········(·······································
····· ·/············)·······································
····%·P·············)·······································
···A· ······················································
··%·A·······················································
···=························································
····························································
····························································
····························································
····························································
····························································
····························································

3

梁,添加了11个字符

添加了一个额外的H以阻止它像cat程序那样运行。该qi被忽略。我可能可以做得更大一些,但这似乎有点作弊。

v---H\
>qir@uH

现在网格

·········v---H\·············································
·········>qir@uH····a·······································
··········?pio;·····l·······································
··········,u········e·······c·······························
··········.t········r·······a·······························
··········@s······s t=" " r t#50:20 w !,t,!·················
··········· ··printf(·······(·······························
···········g··    input('','s'))····························
···········e·····n··r·······c·······························
········write(read-host)····a·······························
·········E·s········m·······n·······························
········C·E·········p·······(·······························
·······H·T··········t·······,·············r·················
······O· ···········(·······'·······························
····· ·/············)·······'·······························
····%·P·············)·······)·······························
···A· ······················)·······························
··%·A·······················································
···=························································
{elbaworhT sworht )a][gnirtS(niam diov citats cilbup{C ssalc
;))(txen.)ni.metsyS(rennacS.litu.avaj wen(nltnirp.tuo.metsyS
··························································}}
····························································
····························································
····························································

3

ferNANDo,添加了31个字符

a b c d e f g h i
b c d e f g h i

新的网格:

·········v---H\·············································
·········>qir@uH···IaP.·····································
Get a chr!?pio;·····l·······································
Outputs it,u········e·······c·······························
and 'BZam..t········r·······a·······························
········~,@s······s t=" " r t#50:20 w !,t,!·················
··········· ··printf(·······(·······························
···········g··    input('','s'))····························
···········e·····n··r·······c·········g·····················
·······(write(read-host)····a)········r······ ··············
·······))E·s········m·······n)········e·····················
········C·E·········p·······((·······{print;exit}····K······
·······H·T··········t·······,t········ ···r·················
······O· ···········(·······'u········-·····················
····· ·/············)·······'p········m·····················
····%·P·············)·······)n········1·····················
···A· ······················)i·······n ·····················
··%·A························(······-·.·····················
···=·························t····· ···$·d··················
{elbaworhT sworht )a][gnirtS(niam diov citats cilbup{C ssalc
;))(txen.)ni.metsyS(rennacS.litu.avaj wen(nltnirp.tuo.metsyS
·····························r··e···a b c d e f g h i·····}}
·····························p·h···=b c d e f g h i·········
··································<·························
·································>··························

3

方案,添加了8个字符

(write(
read
))

新的网格:

·········v---H\·······················S·P··············;····
······,··>qir@uH···IaP.··············A·USE: io·········>····
Get a chr!?pio;·····l···············Y·Lreadln(write(···;····
Outputs it,u········e·······c······ ·L·print(readline())····
and 'BZam..t········r·······a·····ai ··string))········;····
········~,@s······s t=" " r t#50:20 w !,t,!············E····
······main( ){printf("%c",  (getchar()));}·············;····
···········g·>    input('','s'))·······················P····
···········e·····n··r·····^·c·········g················;····
·······(write(read-host)····a)········r·input n$!?·····(····
·······))E·s········m·······n)········e·print n$·······;····
········C·E·········p·······((·······{print;exit}····K·*····
·······H·T··········t·······,t········ ···r·················
······O· ···········(·······'u········-·····················
····· ·/············)·······'p········m·····················
····%·P·············)·······)n········1·····················
···A· ······················)io······n ·····`···············
··%·A························(······-·.··di _r(a)···········
·$·=·························t\···· ···$;di $a··············
{elbaworhT sworht )a][gnirtS(niam diov citats cilbup{C ssalc
;))(txen.)ni.metsyS(rennacS.litu.avaj wen(nltnirp.tuo.metsyS
·····························r··e···a b c d e f g h i·····}}
·····························p·h···=b c d e f g h i·········
··································<·························
·································>··························

3

重击,添加6个字符

head -n1

网格现在是:

·········v---H\·············································
·········>qir@uH····a·······································
··········?pio;·····l·······································
··········,u········e·······c·······························
··········.t········r·······a·······························
··········@s······s t=" " r t#50:20 w !,t,!·················
··········· ··printf(·······(·······························
···········g··    input('','s'))····························
···········e·····n··r·······c·······························
········write(read-host)····a·······························
·········E·s········m·······n·······························
········C·E·········p·······(·······························
·······H·T··········t·······,·············r·················
······O· ···········(·······'·······························
····· ·/············)·······'·······························
····%·P·············)·······)·········1·····················
···A· ······················)········n······················
··%·A·······························-·······················
···=······························· ···$·d··················
{elbaworhT sworht )a][gnirtS(niam diov citats cilbup{C ssalc    
;))(txen.)ni.metsyS(rennacS.litu.avaj wen(nltnirp.tuo.metsyS    
································e···a·····················}}
·······························h···=························
··································<·························
·································>··························

3

itflabtijtslwi,添加了5个字符

GGOaGGOa

这是///语言,但由包围时需要用户输入GG。它们之间的任何东西都被“命名”。因此,这只是呼应STDIN的第一个字符。(由于这仅读取1个字符,因此2个字符的名称意味着它将始终用您键入的内容替换Oa后停止)

从(垂直,向下)=(0,1)到(0,9)垂直添加到左上角

新的网格:

·········v---H\··v+C+<D_··············S·P··············;····
G`····,··>qir@uH·  IaP.C·············A·USE: io·········>····
Get a chr!?pio;····Ol···············Y·Lreadln(write(···;····
Outputs it,u········e·······c······ ·L·print(readline())····
and 'BZam..t········r·······a·····ai ··string))··<v;···;····
G·······~,@s······s t=" " r t#50:20 w !,t,!······?a?···E····
G·····main( ){printf("%c",  (getchar()));}·······pr>···;····
O··········g·>    input('','s'))·················h_····P····
a··········e·····n··r·····^·c·········g··········pd····;····
·······(write(read-host)····a)········r·input n$!?u····(····
·······))E·s········m·······n)········e·print n$··m····;····
········C·E·········p·······((·······{print;exit}·pYEK·*····
·······H·T··········t·······,t········ ···r·······(·········
······O· ···········(·······'u········-···········$·········
····· ·/(println····)·······'p········m···········a·········
····%·P·  (read-line))······)n········1···········r·········
···A· ······················)io······n ·····`·····g·········
··%·A························(······-·.··di _r(a)·v·········
·$·=·························t\···· ···$;di $a····)·········
{elbaworhT sworht )a][gnirtS(niam diov citats cilbup{C ssalc
;))(txen.)ni.metsyS(rennacS.litu.avaj wen(nltnirp.tuo.metsyS
·····························r··e···a b c d e f g h i·····}}
·····························p·h···=b c d e f g h i·········
··································<·························
·································>··························

充分利用现有的GOa!+1
ETHproductions 2015年

3

PHP,添加了24个字符

<?php
var_dump($argv)
;?>

网格现在是:

·········v---H\··v+C+<D_··············S·P··············;····
·`····,··>qir@uH·  IaP.C·············A·USE: io·········>····
Get a chr!?pio;····Ol···············Y·Lreadln(write(···;····
Outputs it,u········e·······c······ ·L·print(readline())····
and 'BZam..t········r·······a·····ai ··string))··<v;···;····
········~,@s······s t=" " r t#50:20 w !,t,!······?a?···E····
······main( ){printf("%c",  (getchar()));}·······pr>···;····
···········g·>    input('','s'))·················h_····P····
···········e·····n··r·····^·c·········g··········pd····;····
·······(write(read-host)····a)········r·input n$!?u····(····
·······))E·s········m·······n)········e·print n$··m····;····
········C·E·········p·······((·······{print;exit}·p··K·*····
·······H·T··········t·······,t········ ···r·······(·········
······O· ···········(·······'u········-···········$·········
····· ·/(println····)·······'p········m···········a·········
····%·P·  (read-line))······)n········1···········r·········
···A· ······················)io······n ·····`·····g·········
··%·A························(······-·.··di _r(a)·v·········
·$·=·························t\···· ···$;di $a····)·········
{elbaworhT sworht )a][gnirtS(niam diov citats cilbup{C ssalc
;))(txen.)ni.metsyS(rennacS.litu.avaj wen(nltnirp.tuo.metsyS
·····························r··e···a b c d e f g h i·····}}
·····························p·h···=b c d e f g h i·········
··································<·························
·································>··························

1
如果要使用-r开关执行代码,则可以删除开始标记。另外,您不需要结束标记(无论如何也不应使用)。您的完整程序现在到了var_dump($argv);。您可以print_r($args)改用并保存1个字节。
Ismael Miguel

3

视网膜,添加了1个字符

G`

这本质上是catG激活grep模式,即程序打印出与给定正则表达式匹配的程序的每一行。但是正则表达式为空,因此每一行都是一个匹配项,并且整个输入都被打印回STDOUT。

·········v---H\··v+C+<D_··············S·P··············;····
·`····,··>qir@uH·  IaP.C·············A·USE: io·········>····
Get a chr!?pio;····Ol···············Y·Lreadln(write(···;····
Outputs it,u········e·······c······ ·L·print(readline())····
and 'BZam..t········r·······a·····ai ··string))········;····
········~,@s······s t=" " r t#50:20 w !,t,!············E····
······main( ){printf("%c",  (getchar()));}·············;····
···········g·>    input('','s'))·······················P····
···········e·····n··r·····^·c·········g················;····
·······(write(read-host)····a)········r·input n$!?·····(····
·······))E·s········m·······n)········e·print n$·······;····
········C·E·········p·······((·······{print;exit}····K·*····
·······H·T··········t·······,t········ ···r·················
······O· ···········(·······'u········-·····················
····· ·/············)·······'p········m·····················
····%·P·············)·······)n········1·····················
···A· ······················)io······n ·····`···············
··%·A························(······-·.··di _r(a)···········
·$·=·························t\···· ···$;di $a··············
{elbaworhT sworht )a][gnirtS(niam diov citats cilbup{C ssalc
;))(txen.)ni.metsyS(rennacS.litu.avaj wen(nltnirp.tuo.metsyS
·····························r··e···a b c d e f g h i·····}}
·····························p·h···=b c d e f g h i·········
··································<·························
·································>··························

3

RunR,添加了8个字符

目前倒数第一

S (I\
FO) /

靠近中间添加,向下和向左一点。新的网格是

·········v---H\·Iv+C+<D_··············S·P··············;····
G`····,··>qir@uH·  IaP.C········LAMBDA·USE: io·········>····
Get a chr!?pio;····Ol···········ZEROY·Lreadln(write(···;····
Outputs it,u········e·······c······ ·L·print(readline())····
and 'BZam..t········r·······a·····ai ··string))··<v;i:j;p:j·
G·······~,@s······s t=" " r t#50:20 w !,t,!······?a?·:·E····
G·····main( ){printf("%c",  (getchar()));}·······pr>·:·;····
O·········)g·>    input('','s'))·················h_··)·P····
a··········e·····n··r·····^·c·········g··········pd····;····
·······(write(read-host)····a)········r·input n$!?u····(····
·······))E·s········m·······n)···KVGH·e·print n$!·m····;····
········C·E·········p·······((···TIIA{print;exit}·pYEK·*····
$'main'H·T··········t·······,t···HSMI· ···r·······(·········
 \/\··O· ·········S (I\·····'u···XIM ·-···········$·········
  \/· ·/(println··FO) /·····'p···BBE1·m···········a·········
   \%·PQ  (read-line))······)n···YLH.·1···········r·········
   A\     /-io-\············)io··EE 4n ·····`·····g·········
  % A\-e-<     |·············(···· V-·.··di _r(a)·v·········
 $ =      \----#·············t\···V ···$;di $a····)·········
{elbaworhT sworht )a][gnirtS(niam diov citats cilbup{C ssalc
;))(txen.)ni.metsyS(rennacS.litu.avaj wen(nltnirp.tuo.metsyS
··`[x.````?10xx][x.````?10xx]r··e···a b c d e f g h i·····}}
···········>maertsoi<edulcni#p·h···=b c d e f g h i·········
····;s gnirts::dts{)(niam tni····v<   o<····················
···};s<<tuoc::dts;s>>nic::dts···o>i:1+?/;···················

如果您还没有添加,我将在其中安装F#。
Timwi'9

@Timwi,对此感到抱歉
MickyT 2015年

3

Mathematica,添加了19个字符

Print@InputString[];

新网格:

·········v---H\OIv+C+<D_··············S·P··············;····
G`····,··>qir@uH·  IaP.C········LAMBDA·USE: io·········>····
Get a chr!?pio;····Ol···········ZEROY·Lreadln(write(···;····
Outputs it,u········e·······c······ ·L·print(readline())····
and 'BZam..t········r·······a·····ai ··string))··<v;i:j;p:j·
G·······~,@s······s t=" " r t#50:20 w !,t,!······?a?·:·E····
G·····main( ){printf("%c",  (getchar()));}·······pr>·:·;····
O·········)g·>    input('','s'))·················h_··)·P····
a··········e·····n··r·····^·c·········g··········pd····;····
·······(write(read-host)····a)········r·input n$!?u····(····
·······))E·s········m·······n)···KVGH·e·print n$!·m····;····
········C·E·········p·······((···TIIA{print;exit}·pYEK·*····
$'main'H·TUPTUO·····t·······,t···HSMI· ···r·······(·········
 \/\··O· ·TUPNI···S (I\·····'u···XIM ·-···········$·········
  \/· ·/(println··FO) /·····'p···BBE1·m···········a·········
   \%·PQ  (read-line))······)n···YLH.·1··print(io.read())···
   A\     /-io-\············)io··EE 4n ····,`·····g·········
  % A\-e-<     |·············(···· V-·.··di _r(a)·v·········
 $ =      \----#·············t\·c·V ···$;di $a····)·········
{elbaworhT sworht )a][gnirtS(niam diov citats cilbup{C ssalc
;))(txen.)ni.metsyS(rennacS.litu.avaj wen(nltnirp.tuo.metsyS
··`[x.````?10xx][x.````?10xx]r··e···a b c d e f g h i·····}}
···········>maertsoi<edulcni#p·h···=b c d e f g h i·········
····;s gnirts::dts{)(niam tni····v<   o<····················
···};s<<tuoc::dts;s>>nic::dts···o>i:1+?/;][gnirtStupnI@tnirP

3

Haskell,添加了16个字符

main = interact id

将stdin复制到stdout。该代码从第15行开始(字符39)。

·········v---H\OIv+C+<D_Include C by GS·Psgv···········;····
G`····,··>qir@uH·  IaP.C.·······LAMBDA·USE: io·········>····
Get a chr!?pio;p···Ol···Z: say TZEROYALreadln(write(···;····
Outputs it,u··a$ ohce·······c······ ·L·print(readline())····
and 'BZam..t···a daer·······a·····ai ··string))·o<v;i:j;p:j·
G·······~,@s······s t=" " r t#50:20 w !,t,!······?a?·:·Eu-··
G·····main( ){printf("%c",  (getchar()));}·······pr>·:·;tg··
O·········)g·>    input('','s'))(enildr ,tnirp···h_··)·P(e··
a··········e·····n··r·····^·c·········g··········pd····;Ct··
·······(write(read-host)····a)········r·input n$!?u····()(··
·······))E·s········m·······n)···KVGH·e·print n$!·m····;.C··
········C·E·········p·······((···TIIA{print;exit}·pYEK·*·)··
$'main'H·TUPTUO·····t·00····,t···HSMI· ···r·······(······,··
 \/\I^O= ·TUPNI···S (I\\/\]]'u···XIM ·-···········$·········
  \/· ·/(println··FO) /·····'p···BBE1·main = interact id····
   \%·PQ  (read-line))······)n···YLH.·1··print(io.read())···
   A\     /-io-\············)io··EE 4n ··@.,`·····g·········
  % A\-e-<     |··········)#_(···· V-·.··di _r(a)^v·········
 $ =      \----#·············t\·c&V ···$;di $a····)·········
{elbaworhT sworht )a][gnirtS(niam diov citats cilbup{C ssalc
;))(txen.)ni.metsyS(rennacS.litu.avaj wen(nltnirp.tuo.metsyS
··`[x.````?10xx][x.````?10xx]r··e···a b c d e f g h i·····}}
···········>maertsoi<edulcni#p·h···=b c d e f g h i·········
····;s gnirts::dts{)(niam tni····v<   o<····················
···};s<<tuoc::dts;s>>nic::dts···o>i:1+?/;][gnirtStupnI@tnirP

3

好的 ,添加了19个字符

Ook. Ook! Ook! Ook.

放在第24行。

·········v---H\OIv+C+<D_Include C by GS·Psgv···········;····
G`····,.·>qir@uH·  IaP.C.%······LAMBDA·USE: io·········>····
Get a chr!?pio;p···Ol···Z: say TZEROYALreadln(write(···;····
Outputs it,u··a$ ohce····.··c······ ·L·print(readline())····
and 'BZam..t···a daer····x··a·····ai ··string))·o<v;i:j;p:j·
G·······~,@s······s t=" " r t#50:20 w !,t,!······?a?·:,Eu-··
G·····main( ){printf("%c",  (getchar()));}·······pr>·:·;tg··
O·········)g·>    input('','s'))(enildr ,tnirp···h_··)·P(e··
a··········e·····n··r·····^·c·········g··········pd····;Ct··
·······(write(read-host)····a)········r·input n$!?u····()(··
·······))E·s········m·······n)···KVGH·e·print n$!·m····;.C··
········C·E·········p·······((···TIIA{print;exit}·pYEK·*·)··
$'main'H·TUPTUO·····t·00····,t···HSMI· ···r·······(······,··
 \/\I^O= ·TUPNI···S (I\\/\]]'u···XIM ·-···········$·········
  \/· ·/(println··FO) /·····'p···BBE1·main = interact id····
   \%·PQ  (read-line))······)n···YLH.·1··print(io.read())···
   A\     /-io-\············)io··EE 4n ··@.,`·····g·········
  % A\-e-<     |··········)#_(o··· V-·.··di _r(a)^v·········
 $ =      \----#·············t\·c&V ···$;di $a····)·········
{elbaworhT sworht )a][gnirtS(niam diov citats cilbup{C ssalc
;))(txen.)ni.metsyS(rennacS.litu.avaj wen(nltnirp.tuo.metsyS
··`[x.````?10xx][x.````?10xx]r··e···a b c d e f g h i·····}}
··········;>maertsoi<edulcni#p·h···=b c d e f g h i·········
····;s gnirts::dts{)(niam tni····v<   o<Ook. Ook! Ook! Ook.·
···};s<<tuoc::dts;s>>nic::dts···o>i:1+?/;][gnirtStupnI@tnirP

2

八度/ Matlab,添加了23个字符

printf(
    input('','s'))

我们可以拿C吗?:D

网格现在是:

····························································
···········i········a·······································
··········?pio;·····l·······································
··········,u········e·······································
··········.t········r·······································
···········s········t·······································
··········· ··printf(·······································
···········g··    input('','s'))····························
···········e·····n··r·······································
········write(read-host)····································
···········s········m·······································
····················p·······································
····················t·····················r·················
····················(·······································
····················)·······································
····················)·······································
····························································
····························································
····························································
····························································
····························································
····························································
····························································
····························································
····························································
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.