結果

問題 No.1851 Regular Tiling
ユーザー 👑 KazunKazun
提出日時 2022-02-25 22:01:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 181 ms / 2,000 ms
コード長 323 bytes
コンパイル時間 264 ms
コンパイル使用メモリ 87,268 KB
実行使用メモリ 80,168 KB
最終ジャッジ日時 2023-09-16 16:57:36
合計ジャッジ時間 4,459 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,020 KB
testcase_01 AC 158 ms
78,448 KB
testcase_02 AC 163 ms
79,264 KB
testcase_03 AC 145 ms
78,884 KB
testcase_04 AC 138 ms
78,500 KB
testcase_05 AC 143 ms
78,156 KB
testcase_06 AC 146 ms
78,744 KB
testcase_07 AC 145 ms
78,408 KB
testcase_08 AC 147 ms
78,220 KB
testcase_09 AC 146 ms
77,944 KB
testcase_10 AC 138 ms
78,540 KB
testcase_11 AC 80 ms
75,900 KB
testcase_12 AC 76 ms
76,148 KB
testcase_13 AC 160 ms
79,052 KB
testcase_14 AC 181 ms
80,168 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=sys.stdin.readline

T=int(input())
for _ in range(T):
    H,W=map(int,input().split())

    if H%3==0 or H%3==1:
        alpha=0
    else:
        alpha=2

    if W%3==0 or W%3==1:
        beta=0
    else:
        beta=2

    for i in range(H):
        print(*[(i%3!=alpha)+(j%3!=beta) for j in range(W)])
0