paste bin
Author
Language
Python
Plain text
Accesslog
Action script
Ada
Apache
Arduino
Armasm
Autohotkey
Awk
Bash
Basic
Brainfuck
C
Clojure
Cmake
C++
C#
css
D
Delphi
Dockerfile
Erlang
Fortran
F#
Gauss
Go
Gradle
Graphql
Groovy
Haskell
Ini
Java
JavaScript
json
Julia
Kotlin
Lasso
LaTeX
Leaf
lisp
llvm
Lua
Makefile
Markdown
Mathematica
Matlab
Nginx
Objective-C
Ocaml
Oxygene
Perl
PgSQL
php
Powershell
Processing
Profile
Properties
Puppet
Purebasic
Q
QML
R
Ruby
Rust
Scala
Scheme
Scilab
Shell
Smalltalk
SQL
Swift
Typescript
VB.NET
VB Script
Verilog
Vim
Wasm
x86asm
Xml
Xquery
Yaml
source code:
R,C=list(map(int,input().split(" "))) pic=[] for i in range(R): pic.append(list(input())) for y in range(C): p_x=R-1 p_y=y malicCount=0 for x in range(R-1,-1,-1): if pic[x][y]=='a': malicCount+=1 pic[x][y]='.' elif pic[x][y]=='#': for i in range(malicCount): pic[p_x-i][p_y]='a' p_x=x-1 malicCount=0; for i in range(malicCount): pic[p_x-i][p_y]='a' for it in pic: for c in it: print(c,end="") print()
comment: