Compare commits
No commits in common. 'ff20bf65fd713df07a282acaf5e28712fbc3213d' and 'b84425cb176c2078a852d911b3cc51d45d8e3072' have entirely different histories.
ff20bf65fd
...
b84425cb17
@ -1,4 +1,3 @@
|
|||||||
java temurin-21.0.3+9.0.LTS
|
java temurin-21.0.3+9.0.LTS
|
||||||
maven 3.9.6
|
maven 3.9.6
|
||||||
pyton 3.13.3
|
|
||||||
ghc 9.8.4
|
ghc 9.8.4
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
SELECT *
|
|
||||||
FROM CITY
|
|
||||||
WHERE COUNTRYCODE = 'USA'
|
|
||||||
AND POPULATION > 100000;
|
|
||||||
|
|
||||||
|
|
||||||
SELECT CITY, STATE
|
|
||||||
FROM STATION;
|
|
||||||
|
|
||||||
|
|
||||||
SELECT DISTINCT CITY FROM STATION WHERE ID % 2 = 0;
|
|
@ -1,25 +0,0 @@
|
|||||||
package com.olexyn.field.kit.hacker.rank.problems;
|
|
||||||
|
|
||||||
public class CatMouseABC {
|
|
||||||
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static String catAndMouse(int x, int y, int z) {
|
|
||||||
|
|
||||||
int dx = Math.abs(x - z);
|
|
||||||
int dy = Math.abs(y - z);
|
|
||||||
if (dx == dy) {
|
|
||||||
return "Mouse C";
|
|
||||||
}
|
|
||||||
if (dx < dy) {
|
|
||||||
return "Cat A";
|
|
||||||
}
|
|
||||||
return "Cat B";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
package com.olexyn.field.kit.hacker.rank.problems;
|
|
||||||
|
|
||||||
public class KeysBudget {
|
|
||||||
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static int getMoneySpent(int[] keyboards, int[] drives, int b) {
|
|
||||||
int max = -1;
|
|
||||||
|
|
||||||
for (int k : keyboards) {
|
|
||||||
for (int d : drives) {
|
|
||||||
int sum = k + d;
|
|
||||||
if (sum <= b && sum > max) {
|
|
||||||
max = sum;
|
|
||||||
}
|
|
||||||
if (max == b) {
|
|
||||||
return max;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return max;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -0,0 +1,13 @@
|
|||||||
|
package org.example;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hello world!
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class App
|
||||||
|
{
|
||||||
|
public static void main( String[] args )
|
||||||
|
{
|
||||||
|
System.out.println( "Hello World!" );
|
||||||
|
}
|
||||||
|
}
|
@ -1,32 +0,0 @@
|
|||||||
def do_foo():
|
|
||||||
if n % 2 == 1:
|
|
||||||
print('Weird')
|
|
||||||
return
|
|
||||||
if 1 < n < 6:
|
|
||||||
print('Not Weird')
|
|
||||||
if 5 < n < 12:
|
|
||||||
print('Weird')
|
|
||||||
if 19 < n:
|
|
||||||
print('Not Weird')
|
|
||||||
|
|
||||||
|
|
||||||
def log_base_10(n):
|
|
||||||
if n == 0:
|
|
||||||
return float('-inf') # Logarithm of 0 is undefined
|
|
||||||
count = 0
|
|
||||||
while n >= 1:
|
|
||||||
n /= 10
|
|
||||||
count += 1
|
|
||||||
return count
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
n = 102
|
|
||||||
out = 0
|
|
||||||
for i in range(1, n + 1):
|
|
||||||
power = (i // 10 + 1)
|
|
||||||
|
|
||||||
# print(i, i / 10, log_base_10(i), pow(10, log_base_10(i) - 1), pow(10, power))
|
|
||||||
out = out * pow(10, log_base_10(i)) + i
|
|
||||||
|
|
||||||
print(out)
|
|
@ -1,11 +0,0 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<parent>
|
|
||||||
<groupId>com.olexyn</groupId>
|
|
||||||
<artifactId>field-kit</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
</parent>
|
|
||||||
<artifactId>py-kit</artifactId>
|
|
||||||
<packaging>jar</packaging>
|
|
||||||
<!-- dummy -->
|
|
||||||
</project>
|
|
@ -1,20 +0,0 @@
|
|||||||
def log_base_10(n):
|
|
||||||
if n == 0:
|
|
||||||
return float('-inf') # Logarithm of 0 is undefined
|
|
||||||
count = 0
|
|
||||||
while n >= 1:
|
|
||||||
n /= 10
|
|
||||||
count += 1
|
|
||||||
return count
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
n = 102
|
|
||||||
out = 0
|
|
||||||
for i in range(1, n + 1):
|
|
||||||
power = (i // 10 + 1)
|
|
||||||
|
|
||||||
# print(i, i / 10, log_base_10(i), pow(10, log_base_10(i) - 1), pow(10, power))
|
|
||||||
out = out * pow(10, log_base_10(i)) + i
|
|
||||||
|
|
||||||
print(out)
|
|
Loading…
Reference in new issue