• Skip to primary navigation
  • Skip to content
  • Skip to footer
Dev Battery Dev Battery Keep your battery charged
    Wonjun Jeong

    Wonjun Jeong

    Backend Developer

    • Korea Republic
    • Email
    • GitHub
  • All Posts (836)
    • ๐Ÿ€ Diary
      • Today I Learned (199)
    • ๐Ÿ“ˆ Algorithm
      • Recap (4)
      • LeetCode (116)
      • HackerRank (130)
      • Codeforces (43)
      • Programmers (88)
      • Baekjoon (153)
      • Inflearn (2)
    • ๐Ÿ“’ Issue
      • Project (23)
    • ๐Ÿง‘๐Ÿปโ€๐Ÿ’ป Programming
      • DevOps (3)
      • Java (15)
      • Spring (21)
      • FastAPI (0)
      • Vue (1)
      • React (2)
    • ๐Ÿ–ฅ๏ธ Computer Science
      • Network (7)
      • Database (10)
      • Data Structure (13)

    [LeetCode] 2413. Smallest Even Multiple (Java)

    Published: 2023-01-25
    Updated: 2023-01-25

    On this page

    • Solution
    • Reference


    Solution

    class Solution {
        public int smallestEvenMultiple(int n) {
            if (n % 2 == 0) {
                return n;
            }
            return n * 2;
        }
    }
    

    Tags: algorithms

    Categories: LeetCode

    Published: 2023-01-25
    Updated: 2023-01-25

    Previous Next

    Leave a comment

    You may also enjoy

    [TIL] ์‹ ์ž… ๊ฐœ๋ฐœ์ž ์ž…์‚ฌ 1์ผ์ฐจ

    Published: 2025-12-18
    Updated: 2025-12-18

    company

    [TIL] ์‹ ์ž… ๊ฐœ๋ฐœ์ž ์ž…์‚ฌ 0์ผ์ฐจ - ์•ž์œผ๋กœ์˜ ๊ณ„ํš

    Published: 2025-12-17
    Updated: 2025-12-17

    company

    [React] WebStorm์—์„œ VSCode์ฒ˜๋Ÿผ Prettier ์ ์šฉ

    Published: 2025-09-19
    Updated: 2025-09-19

    webstorm, prettier

    [Devops] AWS์˜ Auto Scaling์œผ๋กœ Scale-out ํ•˜์—ฌ ์„œ๋ฒ„ ๋ถ„์‚ฐํ•˜์—ฌ ๋ฐฐํฌ

    Published: 2025-08-25
    Updated: 2025-08-31

    devops, aws, auto-scaling, serverless