結果

問題 No.82 市松模様
ユーザー panapanagdf
提出日時 2019-09-20 16:14:29
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 33 ms / 5,000 ms
コード長 398 bytes
コンパイル時間 100 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-09-14 06:58:15
合計ジャッジ時間 1,001 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

# hello worldと表示する

a=input().split()
for i in range(int(a[1])):
    for j in range(int(a[0])):
        if (i%2==0) and (j%2==0):
            print(a[2],end="")
        elif (i%2==1) and (j%2==1):
            print(a[2],end="")
        
        else:
            if a[2]=="W":
                print("B",end="")
            else:
                print("W",end="")
    print()
        
    
0