Skip to content

Instantly share code, notes, and snippets.

View kendhia's full-sized avatar
💭
Loading...

Dhia Kennouche kendhia

💭
Loading...
View GitHub Profile
def bitimiz(num):
num_bin = bin(num)[2:]
odds_bin = ""
evens_bin = ""
for i in range(len(num_bin)):
if (i%2 == 0):
odds_bin += num_bin[i]
evens_bin += "0"
num = int(input(""))
while(num != 0):
num_bin = "00" + bin(num)[2:]
odds_bin = ""
evens_bin = ""
for i in range(len(num_bin)):
if (i%2 == 0):
odds_bin += num_bin[i]
evens_bin += "0"
else:
@kendhia
kendhia / fun.py
Created December 30, 2016 20:57
final1
num = int(input(""))
while(num != 0):
num_bin = "00" + bin(num)[2:]
odds_bin = ""
evens_bin = ""
for i in range(len(num_bin)):
if (i%2 == 0):
odds_bin += num_bin[i]
evens_bin += "0"
else:
@kendhia
kendhia / fun.py
Created December 30, 2016 22:21
yeap
num = int(input(""))
while(num != 0):
num_bin = bin(num)[2:]
odds_bin = ""
evens_bin = ""
j = 0
for i in range(0, len(num_bin)):
if (int(num_bin[i])%2== 0):
odds_bin += "0"
evens_bin += "0"
package hackerank;
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
package project1;
public class Customer {
private int CustomerID;
private String Name;
private String Surname;
package project1;
public class InternationalCustomer extends Customer {
private String Country;
private String City;
public InternationalCustomer(){
package project1;
public class NationalCustomer extends Customer{
private int LicensePlateNumber;
private String Occupation;
public NationalCustomer() {
InternationCustomer ic =new InternationCustomer(Integer.parseInt(st1.nextToken()), st1.nextToken(), st1.nextToken());
customer1[customerSay] = ic;
Public void addToCart(Item i){
if (SoppingCart == null)
ShoppingCart = new ArrayList<Item>();
ShoppingCart.add(i)
}