Tuples July 07, 2019 if __name__ == '__main__': n = int(input()) integer_list = map(int, input().split()) t=tuple(integer_list) print(hash(t)) Share Get link Facebook X Pinterest Email Other Apps Share Get link Facebook X Pinterest Email Other Apps Comments
Staircase Hackerrank Solution in C April 18, 2019 #include< stdio.h > int main() { int n,i,j,k; scanf( "%d" ,&n); for (i= 0 ;i<n;i++) { for (k=n- 1 ;k>i;k--) { printf( " " ); } for (j= 0 ;j<i+ 1 ;j++) { printf( "#" ); } printf( "\n" ); } return 0 ; } Read more
Breaking the Records Hackerrank solution in C April 20, 2019 #include< stdio.h > int main() { int n,i,a[ 1000 ],x= 0 ,mn= 0 ; scanf( "%d" ,&n); for (i= 0 ;i<n;i++) { scanf( "%d" ,&a[i]); } int min=a[ 0 ],max=a[ 0 ]; for (i= 0 ;i<n;i++) { if (min>a[i]) { min=a[i]; mn++; } } for (i= 0 ;i<n;i++) { if (max<a[i]) { max=a[i]; x++; } } printf( "%d %d" ,x,mn); return 0 ; } Read more
String Split and Join Hackerrank Python Solution July 07, 2019 def split_and_join(line): line=line.split() line= '-' .join(line) return line if __name__ == '__main__' : line = input () result = split_and_join(line) print (result) Read more
Comments
Post a Comment