2235. Add Two Integers Easy

@problem@discussion
#Math



1/**
2 * [2235] Add Two Integers
3 *
4 * Given two integers num1 and num2, return the sum of the two integers.
5 *  
6 * Example 1:
7 * 
8 * Input: num1 = 12, num2 = 5
9 * Output: 17
10 * Explanation: num1 is 12, num2 is 5, and their sum is 12 + 5 = 17, so 17 is returned.
11 * 
12 * Example 2:
13 * 
14 * Input: num1 = -10, num2 = 4
15 * Output: -6
16 * Explanation: num1 + num2 = -6, so -6 is returned.
17 * 
18 *  
19 * Constraints:
20 * 
21 * 	-100 <= num1, num2 <= 100
22 * 
23 */
24pub struct Solution {}
25
26// problem: https://leetcode.com/problems/add-two-integers/
27// discuss: https://leetcode.com/problems/add-two-integers/discuss/?currentPage=1&orderBy=most_votes&query=
28
29// submission codes start here
30
31impl Solution {
32    pub fn sum(num1: i32, num2: i32) -> i32 {
33        0
34    }
35}
36
37// submission codes end
38
39#[cfg(test)]
40mod tests {
41    use super::*;
42
43    #[test]
44    fn test_2235() {
45    }
46}
47


Back
© 2025 bowen.ge All Rights Reserved.