quine】的更多相关文章

javascript有一些奇怪的性质,恩,比如说,非常容易写一个quine,即自己输出自己代码的东西. function a(){console.log(a.toString()+";a();")};a();…
#8. Quine Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://uoj.ac/problem/8 Description 写一个程序,使其能输出自己的源代码. 代码中必须至少包含10个可见字符. Input Output . Sample Input Sample Output HINT 题意 屌! 题解: 屌 见wiki:https://en.wikipedia.org/wiki/Quine_(computing) 代码: #incl…
发鸠之山,其上多柘木,有鸟焉,其状如乌,文首,白喙,赤足,名曰:"精卫",其鸣自詨(音同"笑").是炎帝之少女,名曰女娃.女娃游于东海,溺而不返,故为精卫,常衔西山之木石,以堙(音同"音")于东海. 自指可以产生悖论,可以产生递归. 有一种程序叫做quine,这种程序一旦运行就能够打印出自身内容.quine不能调用文件IO,如print open(__file__).read()不叫quine. 这个才叫quine A = r'''B = &qu…
引用自Wikipedia: 一个quine是一个计算机程序,它不接受任何输入,且唯一的输出就是自身的源代码. @cowboy (Ben Alman) 给出了一个用JavaScript写的quine程序: !function $(){console.log('!'+$+'()')}() 为什么这个quine能成功运行呢? 获得源代码 如果一个程序仅是由一个函数组成的,那么我们很容易获得这个函数的源代码:在大多数JavaScript引擎中,将一个函数转换成字符串就会返回它的源码. > functio…
很有趣的一道题目,如何让一个程序输出自身如果用字符串s表示程序,那么意味着可以通过s来输出sprintf是一个可以利用的函数,相当于要求printf(s,s)输出的就是s那么只需要在s中加入%c和%d等东西就可以实现这一问题了 1 #include <stdio.h> 2 char s[1005]="#include <stdio.h>%cchar s[1005]=%c%s%c;%cint main(){printf(s,10,34,s,34,10,10);}%c&quo…
从 wechall.net 到 net-force.nl 网站,发现网站的内容不错,里面也有不同类型的挑战题目:Javascript / Java Applets / Cryptography / Exploits / Cracking / Programming / Internet / Steganography,有的还有一定的难度.注册了帐号做题,我也从中学到了不少知识.对网络攻防有兴趣的同学可以尝试下. level 601: Keep walking... /* This is a ch…
http://www.ush.it/2009/02/08/php-filesystem-attack-vectors/ On Apr 07, 2008 I spoke with Kuza55 and Wisec about an attack I found some time before that was a new attack vector for filesystem functions (fopen, (include|require)[_once]?, file_(put|get)…
Quine 以哲学家 Willard van Orman Quine (1908-2000) 而命名,表示一个可以生成他自己的完全的源代码的程序.编写出某个语言中最简短的 quine 通常作为黑客们的消遣. 其中一种很简单的解法: #define q(k) main(){return!puts(#k"\nq("#k")");} q(#define q(k) main(){return !puts(#k"\nq("#k")");…
A:Pythagoras's Revenge 代码: #include<cstdio> #define ll long long using namespace std; int main() { ll a; while(scanf("%lld",&a)!=EOF) { ) break; ll aa=a*a; ; ;i<a;i++) { ll x=i; ) continue; ll y=aa/i; !=) continue; >a) ans++; } p…
http://acm.hunnu.edu.cn/online/?action=problem&type=show&id=11354&courseid=0 Problem description The philosopher Willard Van Orman Quine (1908–2000) described a novel method of constructing a sentence in order to illustrate the contradictions…