---
# System prepended metadata

title: 計概

---

# 計概
程式碼:C
```c
int getSum(int a, int b){
    return a+b;

}
```

程式碼:cpp
```cpp
class Solution {
public:
    int getSum(int a, int b) {
        return a+b;
    }
};
```
程式碼:java
```java
class Solution {
    public int getSum(int a, int b) {
        return a+b;
    }
}
```
程式碼:python
```python
class Solution(object):
    def getSum(self, a, b):
        """
        :type a: int
        :type b: int
        :rtype: int
        """
        return a+b
```
程式碼:python3
```python
class Solution:
    def getSum(self, a: int, b: int) -> int:
        return a+b
```
程式碼:csharp
```csharp
public class Solution {
    public int GetSum(int a, int b) {
        return a+b;
    }
}
```
程式碼:javascript
```javascript
/**
 * @param {number} a
 * @param {number} b
 * @return {number}
 */
var getSum = function(a, b) {
   return a+b 
};
```
程式碼:ruby
```ruby
# @param {Integer} a
# @param {Integer} b
# @return {Integer}
def get_sum(a, b)
    return a+b
end
```
程式碼:swift
```swift
class Solution {
    func getSum(_ a: Int, _ b: Int) -> Int {
        return a+b
    }
}
```
程式碼:golang
```golang
func getSum(a int, b int) int {
    return a+b
}
```
程式碼:scala
```scala
object Solution {
    def getSum(a: Int, b: Int): Int = {
        return a+b
    }
}
```
程式碼:kotlin
```kotlin
class Solution {
    fun getSum(a: Int, b: Int): Int {
       return a+b 
    }
}
```
程式碼:rust
```rust
impl Solution {
    pub fn get_sum(a: i32, b: i32) -> i32 {
        return a+b
    }
}
```
程式碼:php
```php
class Solution {

    /**
     * @param Integer $a
     * @param Integer $b
     * @return Integer
     */
    function getSum($a, $b) {
        return $a+$b;
    }
}
```
程式碼:typescript
```typescript
function getSum(a: number, b: number): number {
return a+b;
};
```
程式碼:dart
```dart
class Solution {
  int getSum(int a, int b) {
      return a+b;
  }
}
```