PFischbeck


Sat Nov 5 13:16:35 2016
bash

./code: line 1: bc: command not found

paste -sd+ - | bc
Wed Sep 23 20:16:35 2015
python2
a=[0]*99
p=0
i=0
def bf(u):
 global a,B,i,p;s="";o=0
 while o<len(u):
	c=u[o]
	if"+"==c:a[p]+=1
	if"-"==c:a[p]-=1
	if">"==c:p+=1
	if"<"==c:p-=1
	if"["==c:
		b=f(u,o)
		while a[p]>0:bf(u[o+1:b])
		o=b
	if'.'==c:sys.stdout.write(chr(a[p]))
	if','==c:a[p]=ord(B[i]);i+=1
	o+=1
def f(s,o):
 i=o;p=1
 while 1:
	i+=1
	if'['==s[i]:p+=1
	if']'==s[i]:p-=1
	if p==0:return i
import sys
r=raw_input
A=r()
B=r()
bf(A)
Wed Sep 23 19:51:32 2015
python2
t=input()
while t:t-=1;a,b=raw_input().split();print("false","true")[len(a)==len(b) and a in b+b]
Wed Sep 23 19:50:33 2015
python2

Traceback (most recent call last): File "./code", line 2, in <module> while 1:a,b=raw_input().split();print("false","true")[len(a)==len(b) and a in b+b] EOFError: EOF when reading a line

input()
while 1:a,b=raw_input().split();print("false","true")[len(a)==len(b) and a in b+b]
Wed Sep 23 19:49:35 2015
python2

Traceback (most recent call last): File "./code", line 2, in <module> while 1:a,b=raw_input.split();print("false","true")[len(a)==len(b) and a in b+b] AttributeError: 'builtin_function_or_method' object has no attribute 'split'

input()
while 1:a,b=raw_input.split();print("false","true")[len(a)==len(b) and a in b+b]
Wed Sep 23 19:45:36 2015
python3

File "./code", line 1 input();while1:a,b=raw_input.split();print("false","true")[len(a)==len(b) and a in b+b] ^ SyntaxError: invalid syntax

input();while1:a,b=raw_input.split();print("false","true")[len(a)==len(b) and a in b+b]
Mon Mar 16 01:32:24 2015
python2
r=range
a=[[1]]
a+=([1]+map(lambda x:a[i][x]+a[i][x+1],r(i))+[1] for i in r(input()-1))
for b in a:print"1"+"".join(("%"+str(len(str(a[-1][x+1]))+1)+"s")%b[x+1] for x in r(len(b)-1))
Sun Feb 22 15:22:45 2015
python2
print(input()-1)%9+1
Sun Feb 22 15:20:24 2015
python2
i=raw_input()
while len(i)>1:i=str(sum(map(int,i)))
print i
Thu Feb 19 22:19:33 2015
python2
import calendar as c
[a,b]=map(int,raw_input().split())
r=c.TextCalendar(6).formatmonth(b,a)
print r[r.find("S"):]
Thu Feb 19 22:18:45 2015
python2
import calendar as c
i=map(int,raw_input().split())
r=c.TextCalendar(6).formatmonth(i[1],i[0])
print r[r.find("S"):]
Thu Feb 19 22:16:15 2015
python2
import calendar
i=map(int,raw_input().split())
r=calendar.TextCalendar(6).formatmonth(i[1],i[0])
print r[r.find("S"):]
Thu Feb 12 23:44:25 2015
python2
print input().replace(" ","\n")
Thu Feb 12 23:43:37 2015
python2
print raw_input()[1:-1].replace(" ","\n")
Thu Feb 12 23:16:32 2015
python2

23
34
23
instead of
1
23
34
234
print input()[1:-1].replace(" ","\n")
Thu Feb 12 20:27:29 2015
python2
i=input()
print":".join(map(str,[i/3600,i%3600/60,i%60]))
Thu Feb 12 20:22:29 2015
php
0:2:3
Sun Feb 8 22:09:39 2015
php
hacked
Mon Dec 29 17:24:54 2014
python2
import sys
c=[]
d=[]
for s in sys.stdin:
 [a,b]=s.split()
 d+=[float(a)]
 c+=[b]
print"\\    "+"   ".join(c)
l=range(len(c))
for i in l:print"  ".join([c[i]]+[("%.2f"%(d[j]/d[i]),"1"+"   "*(not(i==j==l[-1])))[i==j] for j in l])
Mon Dec 29 17:18:41 2014
python2

\    USD   EUR   AUD   CHF   SGD   RUB
USD  1     0.82  1.23  0.99  1.32  52.03
EUR  1.22  1     1.50  1.21  1.61  63.45
AUD  0.81  0.67  1     0.80  1.07  42.30
CHF  1.01  0.83  1.24  1     1.33  52.56
SGD  0.76  0.62  0.93  0.75  1     39.42
RUB  0.02  0.02  0.02  0.02  0.03  1   
instead of
\    USD   EUR   AUD   CHF   SGD   RUB
USD  1     0.82  1.23  0.99  1.32  52.03
EUR  1.22  1     1.50  1.21  1.61  63.45
AUD  0.81  0.67  1     0.80  1.07  42.30
CHF  1.01  0.83  1.24  1     1.33  52.56
SGD  0.76  0.62  0.93  0.75  1     39.42
RUB  0.02  0.02  0.02  0.02  0.03  1
import sys
c=[]
d=[]
for s in sys.stdin:
 [a,b]=s.split()
 d+=[float(a)]
 c+=[b]
print"\\    "+"   ".join(c)
l=range(len(c))
for i in l:print"  ".join([c[i]]+[("%.2f"%(d[j]/d[i]),"1   ")[i==j] for j in l])