Skip to content

Commit

Permalink
add examples
Browse files Browse the repository at this point in the history
  • Loading branch information
zehengl committed Nov 24, 2023
1 parent 0337343 commit b849e6f
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/jazzitup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import math

n = int(input())
m = 2
while True:
f = True
for k in range(2, math.ceil(math.sqrt(n * m))):
if not n * m % (k**2):
f = False
break
if not f:
m += 1
else:
break
print(m)
9 changes: 9 additions & 0 deletions src/kafkaesque.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
n = int(input())
t, c = 0, 1
for _ in range(n):
v = int(input())
if v < t:
t = 0
c += 1
t = v
print(c)
16 changes: 16 additions & 0 deletions src/pallatolur.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package main

import "fmt"

func main() {
var a, b int
fmt.Scan(&a)
fmt.Scan(&b)

if (a <= 2) && (2 <= b) {
fmt.Println("1")
fmt.Println("2")
} else {
fmt.Println(":(")
}
}
7 changes: 7 additions & 0 deletions src/pallatolur.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
a, b = io.read("*n", "*n")
if (a <= 2) and (2 <= b) then
print(1)
print(2)
else
print(":(")
end
6 changes: 6 additions & 0 deletions src/pallatolur.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
a, b = int(input()), int(input())
if 2 in range(a, b + 1):
print(1)
print(2)
else:
print(":(")

0 comments on commit b849e6f

Please sign in to comment.