Skip to content

Commit a8f8c3e

Browse files
authoredJun 17, 2021
Update Java Interface
1 parent b32466d commit a8f8c3e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
 

‎Java Interface

+12
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,15 @@ class Solution{
3737
}
3838
}
3939

40+
//or
41+
class MyCalculator implements AdvancedArithmetic{
42+
int sum=0;
43+
public int divisor_sum(int n){
44+
for(int i=1;i<=n/2;i++){
45+
if(n%i==0){
46+
sum+=i;
47+
}
48+
}
49+
return sum+n;
50+
}
51+
}

0 commit comments

Comments
 (0)
Please sign in to comment.