more tests
This commit is contained in:
1 parent
cf79163802
commit
a5e51a3f90
4 files changed
+62
-12
No files matched your search
@@ -16,9 +16,15 @@ fun naiveCountHappyNumbers() {
|
||||
count
|
||||
}
|
||||
|
||||
import lyng.time
|
||||
|
||||
//
|
||||
// After all optimizations it takes ~120ms.
|
||||
//
|
||||
val found = naiveCountHappyNumbers()
|
||||
println("Found happy numbers: "+found)
|
||||
assert( found == 55252 )
|
||||
//for( r in 1..100 ) {
|
||||
// val start = Instant.now()
|
||||
val found = naiveCountHappyNumbers()
|
||||
// println("Found happy numbers: %d time %s"(found, Instant.now() - start))
|
||||
assert( found == 55252 )
|
||||
// delay(0.01)
|
||||
//}
|
||||
Reference in new issue
Block a user