Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

in java write a code that suppose the following input is supplied to the program: 9 Then, the output should be: 12096 (99+999+9999+999)

def mySum(k, n):
    return n * sum([ n1 * n2 for n1, n2 in zip(
        [ i + 1 for i in range(k) ],
        [ 10 ** (k - i - 1) for i in range(k) ])])
Comment

PREVIOUS NEXT
Code Example
Java :: bootstrap messages red 
Sql :: sql disable safe mode 
Sql :: magento 2 order delete from db 
Sql :: postgres get size of database 
Sql :: delete mysql ubuntu 20.04 
Sql :: select nls_date_format 
Sql :: TSQL GET ALL COLUMNS IN TABLE 
Sql :: guid to string sql 
Sql :: oracle sql drop sequence 
Sql :: django.core.exceptions.ImproperlyConfigured: mysqlclient 1.4.0 or newer is required; you have 0.10.1. 
Sql :: how to get notinteger value in sql 
Sql :: wordpress database add admin 
Sql :: sql list all procedures 
Sql :: mysql show databases 
Sql :: alembic.util.exc.CommandError: Target database is not up to date. 
Sql :: Mysql Case sum 
Sql :: postgres alter user password 
Sql :: mysql get first x characters 
Sql :: mysql select random id from table 
Sql :: sql last row in table 
Sql :: ms sql rename database 
Sql :: oracle time 24h 
Sql :: list mysql users 
Sql :: postgresql concatenate multiple rows in group by 
Sql :: import database in mysql command line xampp 
Sql :: oracle to date 
Sql :: mysql count grouped rows 
Sql :: mysql set field unique 
Sql :: postgresql format date dd/mm/yyyy 
Sql :: postgres convert exisiting column to text 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =