Posts

Showing posts from 2020

Word Order |HackerRank solutions in python3

from   collections   import   Counter n = int ( input ()) l = list () for  _  in   range ( n ):      l . append ( input ()) x = Counter ( l ) #print(x) print   ( len ( x )) print ( * x . values ())

No Idea! | HackerRank solution in python

n , m  =  ( int ( i )   for   i   in   input () . split ()) l = map ( int ,( input () . strip () . split ( ' ' ))) a = set ( map ( int , input () . strip () . split ( ' ' ))) b = set ( map ( int ,   input () . strip () . split ( ' ' ))) result = 0 for   i   in   l :      if   i   in   a :          result += 1      if   i   in   b :          result += -1 print ( result )

Find Angle MBC | HackerRank solution in python3

import   math ab = int ( input ()) bc = int ( input ()) print ( str ( int ( round ( math . degrees ( math . atan2 ( ab , bc ))))) +  "° " )

Oasis -Wonderwall | Chords

Image
Capo: 2nd fret   DDUUDDDU DDUUDDDUDUD [Intro] Em   G   D   A7sus4 Em   G   D   A7sus4 Em   G   D   A7sus4 Em   G   D   A7sus4 [Verse 1] Em       G Today is gonna be the day               D                   A7sus4 That they're gonna throw it back to you Em           G By now you should've somehow     D                 A7sus4 Realised what you gotta do Em                   G I don't believe that anybody   D           A7sus4             C   D   A7sus4 Feels the way I do about you now [Verse 2] Em           G Backbeat the word is on the st...

Aama Guitar Chords | Sushant KC

Image
Capo on 3rd Fret Intro : C  F  C  G ] – 2 Verse 1 C              F            C                  G Nau nau mahina kokh ma rakhi timle C                F                    C                 G Bhitrayou malai yo sansaar ma boki jati C              F             C          G Kathin paristithi aayepani timle C              F             C          G Huna denau ama kei pani timro Am         G                F       F Maya ra mamata apaar, G………….Am  ...

Time Delta | HackerRank solution using Python3

#!/bin/python3 import   math import   os import   random import   re import   sys from   datetime   import   datetime # Complete the time_delta function below. def   time_delta ( t1 ,   t2 ):      time_format  =  '%a %d %b %Y %H:%M:%S %z'      t1  =  datetime . strptime ( t1 ,   time_format )      t2  =  datetime . strptime ( t2 ,   time_format )      return   str ( int ( abs (( t1 - t2 ) . total_seconds ())))          if  __ name__  ==  '__main__' :      fptr  =  open ( os . environ [ 'OUTPUT_PATH' ],   'w' )      t  =  int ( input ())      for   t_itr   in   range ( t ):  ...

Collections.namedtuple() | HackerRank solution in python 3

from  __ future__   import   division import   collections N = int ( input ()) columns = ',' . join ( input () . split ()) Student = collections . namedtuple ( 'Student' , columns ) sum = 0 for   i   in   range ( N ):      line  = input () . split ()      student = Student ( * line )      sum += int ( student . MARKS ) print ( sum / N )