challenge-sync-airbus: Handle individual try
This commit is contained in:
parent
ac966f9023
commit
f157d9c3bd
3 changed files with 54 additions and 0 deletions
|
|
@ -251,3 +251,24 @@ func GetTryRank() ([]int64, error) {
|
|||
return rank, nil
|
||||
}
|
||||
}
|
||||
|
||||
func ReverseTriesPoints(points int64) int64 {
|
||||
var i int64 = 1
|
||||
for (i+1)*i*5 < points {
|
||||
i += 1
|
||||
}
|
||||
|
||||
i = i * 10
|
||||
for (i/10-1)*i/10*5+i/10*(i%10) < points {
|
||||
i += 1
|
||||
}
|
||||
|
||||
return i
|
||||
}
|
||||
|
||||
func TermTriesSeq(i int64) float64 {
|
||||
if i%10 == 0 {
|
||||
return float64((i - 1) / 10)
|
||||
}
|
||||
return float64(i / 10)
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue