Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
ванечка с тебя 200 рублей, жду мой сладкий 🤑
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
#python 3.6.9 n=10; s=0; i = 1 A = [2,7,3,12,6,10,13,8,3,5] while i <= n-1: if(A[i] > A[i-1]): A[i] = 2*A[i]-A[i-1] s += A[i] i+=1 print(s)
[
+
]
Show input
edit mode
|
history
|
discussion