JAVA ✅ Easy and short solution
\nclass Solution {\n    public int concatenatedBinary(int n) {\n        long res = 0;\n        int m = 1000000007;\n        for(int i=1;i<=n;i++){\n           S
```\nclass Solution {\n    public int concatenatedBinary(int n) {\n        long res = 0;\n        int m = 1000000007;\n        for(int i=1;i<=n;i++){\n           String s = Integer.toBinaryString(i);\n            res = (res << s.length() ) %m;\n            res = (res+i)%m;\n        }\n        return (int)res;\n    }\n}\n```
['Java']