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

Commit3576b52

Browse files
author
Steve Sun
committed
add 2177
1 parent6f3aa31 commit3576b52

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

‎README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ _If you like this project, please leave me a star._ ★
88

99
| # | Title | Solutions | Video | Difficulty | Tag
1010
|------|----------------|---------------|--------|-------------|-------------
11+
| 2177|[Find Three Consecutive Integers That Sum to a Given Number](https://leetcode.com/problems/find-three-consecutive-integers-that-sum-to-a-given-number/)|[Java](../master/src/main/java/com/fishercoder/solutions/_2177.java)||Medium||
1112
| 2176|[Count Equal and Divisible Pairs in an Array](https://leetcode.com/problems/count-equal-and-divisible-pairs-in-an-array/)|[Java](../master/src/main/java/com/fishercoder/solutions/_2176.java)||Easy||
1213
| 2169|[Count Operations to Obtain Zero](https://leetcode.com/problems/count-operations-to-obtain-zero/)|[Java](../master/src/main/java/com/fishercoder/solutions/_2169.java)||Easy||
1314
| 2166|[Design Bitset](https://leetcode.com/problems/design-bitset/)|[Java](../master/src/main/java/com/fishercoder/solutions/_2166.java)||Medium||
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
packagecom.fishercoder.solutions;
2+
3+
publicclass_2177 {
4+
publicstaticclassSolution1 {
5+
publiclong[]sumOfThree(longnum) {
6+
longremainder =num %3;
7+
longave =num /3;
8+
if (remainder ==0) {
9+
returnnewlong[]{ave -1,ave,ave +1};
10+
}else {
11+
returnnewlong[]{};
12+
}
13+
}
14+
}
15+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp