Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6ebb159

Browse files
github-actionsgithub-actions
github-actions
authored and
github-actions
committed
Formatted with Google Java Formatter
1 parent1b82826 commit6ebb159

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

‎Maths/BinaryPow.java‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,28 @@ public static int binPow(int a, int p) {
2121
returnres;
2222
}
2323

24-
/**
24+
/**
2525
* Function for testing binary exponentiation
26-
* @param a the base
26+
*
27+
* @param a the base
2728
* @param p the exponent
2829
*/
29-
publicstaticvoidtest(inta,intp) {
30+
publicstaticvoidtest(inta,intp) {
3031
intres =binPow(a,p);
3132
assertres == (int)Math.pow(a,p) :"Incorrect Implementation";
3233
System.out.println(a +"^" +p +": " +res);
3334
}
3435

35-
/** Main Function to call tests
36-
*
36+
/**
37+
* Main Function to call tests
38+
*
3739
* @param args System Line Arguments
3840
*/
3941
publicstaticvoidmain(String[]args) {
4042
// prints 2^15: 32768
41-
test(2,15);
43+
test(2,15);
4244

4345
// prints 3^9: 19683
44-
test(3,9);
46+
test(3,9);
4547
}
4648
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp