Hithub Problems
Hithub Problems
com/download/win
---------------------------------
intelliJ - https://download.jetbrains.com/idea/ideaIC-2023.1.3.exe
---------------------------
After downloading and installing git, open windows cmd and type git and hit enter,
to see whether its installed or not.
-----------------------------
--------------------------------------------
Initially commands
git init
git add .
git remote add origin yourrepourl.com
git commit -m "Initial commit done"
git branch -m main
git push -u origin main
---------------------------------
Upon adding your code,
git add .
git commit -m "added so-and-so things in my code
git push -u origin main
------------------------------------------
-----------------------------------------------------------------------------------
-----------------------
There are 3 labs in the CSE department. The labs are L1, L2, and L3 with a seating
capacity of x, y, and z respectively. A single lab needs to be allocated to a class
of ‘n’ students. The labs need to be utilized to the maximum i.e the number of
systems used should not be minimal. Which lab needs to be allocated to this class?
Input consists of 4 integers
The first input denotes ‘x’, The second input denotes ‘y’, The third input denotes
‘z’, The fourth input denotes ‘n’
Output format: Print the lab which is suitable for ‘n’ number of students.
est Cases:
Case 1:
Input
30
40
20
25
Output
L1
Case 2:
Input
30
40
20
15
Output
L3
Case 3:
Input
90
50
60
40
Output
L2
-----------------------------------------------------------------------------------
-------
Mango tree Problem
Dora is interested so much in gardening and she plants more trees in her garden.
She plants trees in a rectangular fashion with the order of rows and columns and
numbered the trees in row-wise order. She planted the mango tree only in a 1st row,
1st column and last column. So given the tree number, your task is to find whether
the given tree is a mango tree or not? Write a program to check whether the given
number is a mango tree or not.
Input consists of 3 integers
The first input denotes the number of rows
The second input denotes the number of columns
The third input denotes the tree number, which you have to find whether it’s a
mango tree or not.
Test Cases:
Case 1:
Input
5
5
11
Output
true
Case 2:
Input
5
5
14
Output
false
Case 3:
Input
10
60
2
Output
true
-----------------------------------------------------------------------------------
---------------
Topper problem
In the University Examinations conducted during the past 5 years, the toppers
registration numbers were 7126, 82417914, 7687 and 6657. Your father is an expert
in data mining and he could easily infer a pattern in the toppers registration
numbers. In all the registration numbers listed here, the sum of the odd digits is
equal to the sum of the even digits in the number. He termed the numbers that
satisfy this property as Probable Topper Numbers. Write a program to find whether a
given number is a probable topper number or not.
est Cases
Case 1:
Input
143
Output
true
Case 2:
Input
344
Output
false
Case 3:
Input
275
Output
false
--------------------------------------------
Jeevitha just started work as a programming trainer for UIT’s Placement Cell. She
is paid Rs.100 an hour, with a few exceptions. She earns an extra Rs.15 an hour for
any part of a day where she works more than 8 hours, and an extra Rs.25 an hour for
hours beyond 40 in any one week. Also, she earns a 25% bonus for working on
Saturday and a 50% bonus for working on Sunday. The bonuses for Saturday and Sunday
are computed based on the hours worked those days; they are not used to calculate
any bonus for working more than 40 hours in a week. You’ll be given the number of
hours Jeevitha worked on each day in a week (Sunday, Monday, ..., Saturday), and
you need to compute her salary for the week.
Input consists of 7 integers less than or equal to 24 on separate lines. Print
Jeevitha’s weekly salary as output.
Test Cases:
Case 1:
Input
0
8
8
8
10
6
0
Output
4030
Case 2:
Input
4
5
0
8
0
6
0
Output
2500
Case 3:
Input
5
3
6
1
1
2
3
Output
2425
---------------------------------------------------
Test Cases:
Case 1:
Input
5
Output
5 16 8 4 2 1 5
Case 2:
Input
1
Output
1 0
Case 3:
Input
4
Output
4 2 1 2