{{ message }}

Instantly share code, notes, and snippets.

Last active Dec 21, 2015
HackerRank Encryption Problem https://www.hackerrank.com/challenges/encryption
View hackerrank-encryption
 #include #include #include using namespace std; string calc(string msg){ int len,row,col,allot,margin; string str=""; len=msg.length();
Created Aug 23, 2013
hackerrank-Find Hackerrank Problem https://www.hackerrank.com/challenges/find-hackerrank
View findhackerrank
 import re N = int(raw_input()) for i in xrange(N): T=str(raw_input()) if re.search(r'^hackerrank',T) and re.search(r'hackerrank\$',T): print 0 elif re.search(r'^hackerrank',T): print 1 elif re.search(r'hackerrank\$',T):
Created Aug 23, 2013
HackerRank- The British and American style of Spelling https://www.hackerrank.com/challenges/uk-and-us
View uk-and-us
 TEXT='' sum=0 N=int(raw_input()) for i in xrange(N): TEXT+=' '+str(raw_input()) T=int(raw_input()) for i in xrange(T): FIND=str(raw_input()) print TEXT.count(FIND)+TEXT.count(FIND[:-2]+'se')
Created Aug 23, 2013
HackerRank Validate PAN Format Problem https://www.hackerrank.com/challenges/valid-pan-format
View valid-pan-format
 import re for i in xrange(input()): pan=str(raw_input()) if re.search(r'[A-Z]{5}[0-9]{4}[A-Z]',pan): print 'YES' else: print 'NO'
Created Aug 23, 2013
HackerRank Saying-Hi Problem https://www.hackerrank.com/challenges/saying-hi
View saying-hi
 import re for i in range(input()): text=str(raw_input()) if re.search(r'^(hi [^d])',text,re.IGNORECASE): print text
Created Aug 23, 2013
HackerRank's hackerrank-tweets problem https://www.hackerrank.com/challenges/hackerrank-tweets
View hackerrank-tweets
 count=0 for i in xrange(input()): text=str(raw_input()) if 'hackerrank' in text.lower(): count+=1 print count
Created Aug 23, 2013
Hackerrank's hackerrank-language Problem https://www.hackerrank.com/challenges/hackerrank-language
View hackerrank-language
 languages=['C','CPP','JAVA','PYTHON','PERL','PHP','RUBY','CSHARP','HASKELL','CLOJURE','BASH','SCALA','ERLANG','CLISP','LUA','BRAINFUCK','JAVASCRIPT','GO','D','OCAML','R','PASCAL','SBCL','DART','GROOVY','OBJECTIVEC'] for i in xrange(input()): input=str(raw_input()).split() language=input[1] if language in languages: print 'VALID' else: print 'INVALID'
Created Mar 15, 2015