Skip to content

Commit

Permalink
update read me
Browse files Browse the repository at this point in the history
  • Loading branch information
Aathifnihas committed Oct 26, 2018
1 parent 435e08b commit a8665e2
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 27 deletions.
1 change: 1 addition & 0 deletions COMPETITORS/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Make a PR and get yourself added to the list.
```
#### Name
- [Github-Username](Link to your Github Profile)
- [Aathifnihas]https://github.com/Aathifnihas)
---
```

Expand Down
11 changes: 6 additions & 5 deletions SOLUTIONS/ACIIIProduct.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
inputString = input()
# author: Higor Santos de Brito Dantas

result = 1
string = raw_input()
product = 1

for i in range(len(inputString)) :
result = result * ord(inputString[i])
for e in string:
product *= ord(e)

print(result)
print product
34 changes: 15 additions & 19 deletions SOLUTIONS/Binary_Multiple_of_3.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
def binary_multiple(number):
x = int(number,2)
if x%3 == 0:
return 1
else:
return 0

test = int(input("Enter the number of test cases"))
list1 = []
while test < 1 or test > 100:
print("Number of test cases must be between 1 and 100")
test = int(input("Enter the number of test cases"))
for x in range(test):
y = input("Enter the binary number")
while len(y) < 1 or len(y) > 100:
print("Length of input string must be between 1 and 100")
y = input("Enter the binary number")
list1.append(y)
for x in range(test):
print(binary_multiple(list1[x]))


ntcases = int(input("Please type the number of test cases: "))
for i in range(ntcases):
binaryString = input("Please type a binary number: ")
exp = 0
result = 0
for bit in binaryString:
result += int(bit)*(2**exp)
exp = exp+1
if (result%3 == 0):
print("1")
else:
print("0")

6 changes: 3 additions & 3 deletions SOLUTIONS/HelloWorld.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
fun main(args: Array<String>) {
println("Hello, World!")
}
fun main(args : Array<String>) {
println("Hello, world!")
}

0 comments on commit a8665e2

Please sign in to comment.