Answers:
_26_=>_26_**6.25**.5
当然,最困难的部分是弄清楚如何处理所有多余的字符。(并且也不要像我刚开始时那样,在错误的线程中发布此解决方案。糟糕!...)
_26_=>
定义了一个匿名函数,该匿名函数_26_
带有一个称为的参数(变量可以以下划线开头,但不能以数字开头)。然后其余的仅用**
作Math.pow()
将输入提高到2.5的幂(6.25幂0.5)。
_26_
是ES7特有的。不知道变量也可以采用这种形式!(我从未见过没有字母的变量)。@Neil是一种非常聪明的方法。而且您也非常聪明地破解了它!让您当之无愧的+1!:)
#include<math.h>
#include"iostream"
using namespace std;int main(){float n;cin>>n;cout<<pow(n,2.5);}
using
,只是做int main(){float n;std::cin>>n;std::cout<<pow(n,2.5);}
太棒了,这是一个Inform7条目。:)我只需要尝试一下。
我很确定这是预期的解决方案:
R is a room.
To f (n - number): say "[n * n * real square root of n]".
请注意,由于使用了Glulx后端,因此该解决方案仅在使用Glulx后端进行编译时才有效 real square root of
功能。
顺便说一句,实际上不需要双引号和方括号;只是say n * n * real square root of n
将工作一样好。命令末尾的句点也可以省略;或者,我们可以保留第一个时期并摆脱换行符。我们可以删除的代码的其他部分包括“房间”之前的“ a”以及括号前和冒号之后的空格。幸运的是,由于我们有一对备用的方括号,因此我们总是可以使用它们来注释掉所有这些多余的字符。;)这也是一个有效的解决方案:
R is room.To f(n - number):say n * n * real square root of n[
" a . "
]
要以交互方式测试此解决方案,将类似以下测试工具的内容添加到代码很方便:
Effing is an action applying to one number.
Understand "f [number]" as effing.
Carry out effing: f the number understood.
编译并运行程序后,您可以f 4. f 6. f 9. f 25
在>
提示符下键入例如,并收到类似以下输出的信息:
Welcome
An Interactive Fiction
Release 1 / Serial number 170404 / Inform 7 build 6L38 (I6/v6.33 lib 6/12N) SD
R
>f 4. f 6. f 9. f 25
32.0
88.18164
243.0
3125.0
>
顺便说一句,我只是注意到Inform(或者大概是Glulx)将f 6
错误的最后一个小数位四舍五入:正确的值更接近88.18163,而不是88.18164。幸运的是,我认为这不会影响解决方案的正确性,特别是因为挑战指定了“您选择的任何舍入机制”。:)
apt-get install gnome-inform7
。
这些*
极具误导性。非常聪明!
lambda i:i**(lambda o,r:o/r)(*map(ord,'i*'))
由于字符集非常有限,如果除了琐碎的重命名或参数重排之外,还有其他有效的解决方案,我将感到非常惊讶。
print (input()**(5.0/(2*5554448893999/5554448893840))-0)
基于通过Python 2的浮点除法(/
整数之间的默认值)丢弃字符。
这是@Flounderer 33字节解决方案的一个破解
scan()^(floor(pi)-1/2)-sin(7*0e1)
用法:
> scan()^(floor(pi)-1/2)-sin(7*0e1)
1: 4
2:
Read 1 item
[1] 32
> scan()^(floor(pi)-1/2)-sin(7*0e1)
1: 6
2:
Read 1 item
[1] 88.18163
> scan()^(floor(pi)-1/2)-sin(7*0e1)
1: 9
2:
Read 1 item
[1] 243
> scan()^(floor(pi)-1/2)-sin(7*0e1)
1: 25
2:
Read 1 item
[1] 3125
sin(pi)
,但不幸的是它确实有效!+1
scan()^(-floor(-sin(pi)*2e17)/10)
Walder
Hodor?!
hodor.
Hodor, Hodor Hodor Hodor Hodor Hodor Hodor Hodor, Hodor Hodor,
hodor,
Hodor, Hodor Hodor Hodor Hodor Hodor Hodor, Hodor Hodor,
Hodor, Hodor Hodor Hodor, hodor!,
HODOR!!
HODOR!!!
说明:
Start
read input into accumulator
copy accumulator to storage
Do math, option 7(nth root), n=2
swap storage and accumulator
Do math, option 6(nth power), n=2
Do math, option 3(times), storage
output accumulator as a number
end
注意:我必须对get解释器进行一些修改才能在我的机器上运行(您发布的代码似乎不接受小写h等等)
另外,我似乎没有足够的代表对此发表评论,所以如果有人可以让@This Guy知道,我将不胜感激
我认为这已解决了该错误,代码现在以Walder而不是Wylis开头,这增加了额外的字节
最难的部分是弄清楚如何处理所有剩菜。
using System;using S=System.Console;class PMabddellorttuuv{static void Main(){S.Write(Math.Pow(double.Parse(S.ReadLine()),2.5));Func<double> o;int q=1,M=q*2,b,e;q*=(q*M);}}
=SQRT(A1)*A1^2/1/ISNA(IP2)
A1作为输入IP2包含具有#N / A错误的第二个输入,在这种情况下,ISNA(IP2)属于1
另外,()
我们可以这样做
=SQRT(A1)*A1^2/ISNA(PI(1/2))
=SQRT(A1)*A1^2/SIN(PI()/2)
如果通过格式化或其他方式设置#NA错误,我将其视为其他第二输入。SQRT和ISNA是仅有的两个有意义的功能。但是请向谁开发了这个问题的人
php38af4r2aoot2srm0itpfpmm0726991i= (lambda x:x**2.5*1*1/1);
也许不是想要的,但是有效;)
$ python3
Python 3.6.1 (default, Apr 4 2017, 09:36:47)
[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> php38af4r2aoot2srm0itpfpmm0726991i= (lambda x:x**2.5*1*1/1);
>>> php38af4r2aoot2srm0itpfpmm0726991i(6)
88.18163074019441
>>> php38af4r2aoot2srm0itpfpmm0726991i(4)
32.0
>>> php38af4r2aoot2srm0itpfpmm0726991i(25)
3125.0
仍然没有足够的代表对警察的回答发表评论,对不起...如果有人可以为我做,谢谢,谢谢!
from math import pi as pp0012223467899;f=lambda x:x**2.5*1*(1)/1
只是为了看看我被打败了。我在警察线上为您添加了此帖子的链接。
s=e=x=y=input()**0.5
print'%.3f'%(y**(5.0))
y=x=e=s
,两者都可以工作:))反正干得好!
这是@Flounderer的31字节解决方案的一个破解:
`[.`=function(`]`)`]`^`[`(lh,9)
Ok that was a tough one. It creates a function called `[.`
. The argument to the function is called `]`
which is elevated to power 2.5 by using the 9th element of the built-in time-serie lh
("a regular time series giving the luteinizing hormone in blood samples at 10 mins intervals from a human female, 48 samples." that is used as example in one of R's base packages). lh[9]
is here on top of it replaced by its equivalent `[`(lh, 9)
. De-obfuscated by substituting f
for the function name and n
for the argument name, the function then becomes f=function(n)n^lh[9]
.
Usage:
> `[.`=function(`]`)`]`^`[`(lh,9)
> `[.`(4)
[1] 32
> `[.`(6)
[1] 88.18163
> `[.`(9)
[1] 243
> `[.`(25)
[1] 3125
print int(raw_input())**(0+000000000000.5*5)
Takes input from raw_input, converts to int and raises to power 2.5
n=>n**("ggggg".length*2**(-"g".length))// ""((((((()))))))***,-...;;=====>Seeeeegggghhhhhhhhhilllnnnnnnorrrsstttttttttttu{}
Gets 5/2 through 5 times 2 to the negative first power, where 5 and 1 were received from the length of strings. Took the easy way out in a sense by commenting out the extraneous characters.
♥²♥1Z/^*
Explanation:
♥²♥1Z/^*
♥² Push first input squared.
♥ Push first input again.
1Z/ Push 1/2
^ First input to the 1/2th
* Multiply square and root
Not sure if it works. I have currently no java on my laptop. :(
Z1
into 1Z
.
product.(<$>(($(succ.cos$0))<$>[(flip<$>flip)id$id,recip])).(**)
Try it online! That was a fun one. I first found product.(<$>(($succ(cos$0))<$>[id,recip])).(**)
which behaves correctly and than had to fit flip flip <$> () $ id .
somewhere into it.
n¹t*qA9¥="'?:@->%#[{!.
Explanation
n # square of input
* # times
¹t # square root of input
q # end program
The rest of the operations never get executed.
We could have done it without the q
as well by having ?
after the calculation and escaping the equality sign for example with '=
.