I hereby claim:
- I am fhorlaville on github.
- I am fhorlaville (https://keybase.io/fhorlaville) on keybase.
- I have a public key whose fingerprint is DF48 A057 4400 D693 C4B5 D80D 87D2 F107 0B37 8677
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
This is my PHP library for controlling a Robot Electronics ETH008 unit. This unit has eight programmable relays and an Ethernet connector.
Here are the files:
functions.php This is the library with the functions you need to call
tests.php These are the unit tests for the functions library ; it shows how you use the functions
let n = Int(readLine()!)! | |
let line0 = readLine()!.components(separatedBy: " ").map{ Int($0)! }.sorted(by: { $0 > $1 }) | |
var answer = 0 | |
var previous = line0[0] | |
for i in 0..<n { | |
if line0[i] == previous { | |
answer += 1 | |
previous = line0[i] | |
} else { |
import Foundation | |
func loader() { | |
let line1 = Double(readLine()!)! | |
let line2 = Int(readLine()!)! | |
let line3 = readLine()!.components(separatedBy: " ").map{ Int($0)! } | |
let a = line3[0] | |
let b = line3[1] | |
let line4 = (readLine()!.components(separatedBy: " ").map{ Int($0)! }).sorted(by: { $0 > $1 }) |