✅✅✅ TWO-LINER SOLUTIONS IN EVERY LANGUAGE!!! ✔
Runtime: 0 ms, faster than 100.00% of C++ online submissions for Smallest Even Multiple.\nMemory Usage: 6 MB, less than 50.00% of C++ online submissions for Sma
**Runtime: 0 ms, faster than 100.00% of C++ online submissions for Smallest Even Multiple.\nMemory Usage: 6 MB, less than 50.00% of C++ online submissions for Smallest Even Multiple.**\n\nC++ code:\n```\nclass Solution {\npublic:\n    int smallestEvenMultiple(int n) {\n        if(n%2==0) return n;\n        else return n*2;\n    }\n};\n```\n\n**Runtime: 0 ms, faster than 100.00% of Java online submissions for Smallest Even Multiple.\nMemory Usage: 38.8 MB, less than 100.00% of Java online submissions for Smallest Even Multiple.**\n\nJava code:\n```\nclass Solution {\n    public int smallestEvenMultiple(int n) {\n        if(n%2==0) return n;\n        else return n*2;\n    }\n}\n```\n\n**Runtime: 23 ms, faster than 100.00% of Python online submissions for Smallest Even Multiple.\nMemory Usage: 13.1 MB, less than 100.00% of Python online submissions for Smallest Even Multiple.**\n\nPython code:\n```\nclass Solution(object):\n    def smallestEvenMultiple(self, n):\n        if(n%2==0): return n\n        else: return n*2\n```\n\n**Runtime: 48 ms, faster than 45.45% of Python3 online submissions for Smallest Even Multiple.\nMemory Usage: 13.8 MB, less than 100.00% of Python3 online submissions for Smallest Even Multiple.**\n\nPython3 code:\n```\nclass Solution:\n    def smallestEvenMultiple(self, n: int) -> int:\n        if(n%2==0): return n\n        else: return n*2\n```\n\n**Runtime: 5 ms, faster than 100.00% of C online submissions for Smallest Even Multiple.\nMemory Usage: 5.7 MB, less than 100.00% of C online submissions for Smallest Even Multiple.**\n\nC code:\n```\nint smallestEvenMultiple(int n){\n    if(n%2==0) return n;\n    else return n*2;\n}\n```\n\n**Runtime: 36 ms, faster than 100.00% of C# online submissions for Smallest Even Multiple.\nMemory Usage: 25.3 MB, less than 100.00% of C# online submissions for Smallest Even Multiple.**\n\nC# code:\n```\npublic class Solution {\n    public int SmallestEvenMultiple(int n) {\n        if(n%2==0) return n;\n        else return n*2;\n    }\n}\n```\n\n**Runtime: 94 ms, faster than 100.00% of JavaScript online submissions for Smallest Even Multiple.\nMemory Usage: 41.7 MB, less than 100.00% of JavaScript online submissions for Smallest Even Multiple.**\n\nJavaScript code:\n```\nvar smallestEvenMultiple = function(n) {\n    if(n%2==0) return n\n    else return n*2\n};\n```\n\n**Runtime: 102 ms, faster than 100.00% of Ruby online submissions for Smallest Even Multiple.\nMemory Usage: 211 MB, less than 100.00% of Ruby online submissions for Smallest Even Multiple.**\n\nRuby code:\n```\ndef smallest_even_multiple(n)\n    if(n%2==0); return n\n    else; return n*2\n    end\nend\n```\n\n**Runtime: 4 ms, faster than 100.00% of Swift online submissions for Smallest Even Multiple.\nMemory Usage: 13.8 MB, less than 100.00% of Swift online submissions for Smallest Even Multiple.**\n\nSwift code:\n```\nclass Solution {\n    func smallestEvenMultiple(_ n: Int) -> Int {\n        if(n%2==0) {return n}\n        else {return n*2}\n    }\n}\n```\n\n**Runtime: 0 ms, faster than 100.00% of Go online submissions for Smallest Even Multiple.\nMemory Usage: 1.9 MB, less than 100.00% of Go online submissions for Smallest Even Multiple.**\n\nGo code:\n```\nfunc smallestEvenMultiple(n int) int {\n    if n%2==0 { return n\n    } else { return n*2 }\n}\n```\n\n**Runtime: 711 ms, faster than 100.00% of Scala online submissions for Smallest Even Multiple.\nMemory Usage: 62.7 MB, less than 100.00% of Scala online submissions for Smallest Even Multiple.**\n\nScala code:\n```\nobject Solution {\n    def smallestEvenMultiple(n: Int): Int = {\n        if(n%2==0) n\n        else n*2\n    }\n}\n```\n\n**Runtime: 247 ms, faster than 100.00% of Kotlin online submissions for Smallest Even Multiple.\nMemory Usage: 33.4 MB, less than 100.00% of Kotlin online submissions for Smallest Even Multiple.**\n\nKotlin code:\n```\nclass Solution {\n    fun smallestEvenMultiple(n: Int): Int {\n        if(n%2==0) return n \n        else return n*2\n    }\n}\n```\n\n**Runtime: 3 ms, faster than 100.00% of Rust online submissions for Smallest Even Multiple.\nMemory Usage: 2.2 MB, less than 100.00% of Rust online submissions for Smallest Even Multiple.**\n\nRust code:\n```\nimpl Solution {\n    pub fn smallest_even_multiple(n: i32) -> i32 {\n        if(n%2==0) {return n}\n        else {return n*2}\n    }\n}\n```\n\n**Runtime: 14 ms, faster than 100.00% of PHP online submissions for Smallest Even Multiple.\nMemory Usage: 19.1 MB, less than 100.00% of PHP online submissions for Smallest Even Multiple.**\n\nPHP code:\n```\nclass Solution {\n    function smallestEvenMultiple($n) {\n        if($n%2==0) return $n;\n        else return $n*2;\n    }\n}\n```\n\n**Runtime: 76 ms, faster than 100.00% of TypeScript online submissions for Smallest Even Multiple.\nMemory Usage: 43.2 MB, less than 100.00% of TypeScript online submissions for Smallest Even Multiple.**\n\nTypeScript code:\n```\nfunction smallestEvenMultiple(n: number): number {\n    if(n%2==0) return n\n    else return n*2\n};\n```\n\n**Runtime: 490 ms, faster than 100.00% of Racket online submissions for Smallest Even Multiple.\nMemory Usage: 98.6 MB, less than 100.00% of Racket online submissions for Smallest Even Multiple.**\n\nRacket code:\n```\n(define/contract (smallest-even-multiple n)\n  (-> exact-integer? exact-integer?)\n                 (if(equal? (modulo n 2) 0) n (* n 2))\n  )\n```
[]