█████████ ████ ███░░░░░███ ░░███ ███ ░░░ ██████ ███████ ██████ ██████ ░███ ███░░███ ███░░███ ███░░███ ███░░███ ░███ ░███ ░███░███ ░███ ░███████ ░███ ░███ ░░███ ███░███ ░███░███ ░███ ░███░░░ ░███ ░███ ░░█████████ ░░██████ ░░████████░░██████ ░░██████ ░░░░░░░░░ ░░░░░░ ░░░░░░░░ ░░░░░░ ░░░░░░

Envío 4758

Problema 0x30 - Incrementar un número muy grande

  • Autor: Ikerlb
  • Fecha: 2021-08-13 05:51:27 UTC (Hace más de 3 años)
Caso # Resultado Tiempo Memoria
#1
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#2
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#3
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#4
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#5
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#6
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#7
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#8
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#9
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#10
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#11
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#12
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#13
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#14
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#15
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#16
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#17
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#18
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#19
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#20
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#21
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#22
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#23
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#24
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#25
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#26
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#27
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#28
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#29
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#30
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#31
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#32
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#33
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
#34
Error de compilación
                      main.c:1:1: error: unknown type name 'def'
def increment(s):
^
main.c:1:17: error: expected function body after function declarator
def increment(s):
                ^
2 errors generated.

                    
Puntos totales: 0 / 100

Código

def increment(s):
    res = []
    c = 1
    for d in reversed(s):
        c, nd = divmod(int(d) + c, 10)
        res.append(str(nd))
    if c > 0:
        res.append(str(c))
    return "".join(reversed(res))

if __init__ == "__main__":
    s = input()
    print(increment(s))