Skip to content

Commit

Permalink
fix: homoint: result may very long
Browse files Browse the repository at this point in the history
  • Loading branch information
guimc233 committed Feb 23, 2024
1 parent 5f3a001 commit 8a175a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/ltd/guimc/lgzbot/utils/HomoIntUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1068,8 +1068,8 @@ object HomoIntUtils {
var flag = 0
var temp1 = 0
for (i in 1..<num) {
for (j in 0..a.size - 1) {
if (a[j] == temp1) {
for (j in 0..<a.size) {
if (a[j].toLong() == i) {
flag = 1
temp1 = i.toInt()
break
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

public class Test {
public static void main(String[] args) {
System.out.println(HomoIntUtils.INSTANCE.getInt(-8964));
System.out.println(HomoIntUtils.INSTANCE.getInt(8965));
}
}

0 comments on commit 8a175a1

Please sign in to comment.