結果

問題 No.1851 Regular Tiling
ユーザー brthyyjpbrthyyjp
提出日時 2022-02-28 15:07:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 170 ms / 2,000 ms
コード長 375 bytes
コンパイル時間 252 ms
コンパイル使用メモリ 87,168 KB
実行使用メモリ 79,608 KB
最終ジャッジ日時 2023-09-20 22:49:44
合計ジャッジ時間 4,742 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,560 KB
testcase_01 AC 118 ms
77,724 KB
testcase_02 AC 124 ms
77,796 KB
testcase_03 AC 121 ms
78,188 KB
testcase_04 AC 119 ms
77,932 KB
testcase_05 AC 117 ms
77,880 KB
testcase_06 AC 121 ms
77,936 KB
testcase_07 AC 116 ms
77,752 KB
testcase_08 AC 117 ms
78,088 KB
testcase_09 AC 121 ms
77,796 KB
testcase_10 AC 119 ms
77,848 KB
testcase_11 AC 85 ms
76,416 KB
testcase_12 AC 81 ms
76,536 KB
testcase_13 AC 134 ms
78,324 KB
testcase_14 AC 170 ms
79,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A = []
for i in range(35):
    A.append([0, 1, 1]*100)
    A.append([1, 2, 2]*100)
    A.append([1, 2, 2]*100)

t = int(input())
for _ in range(t):
    h, w = map(int, input().split())
    if h%3 == 2:
        hoff = 1
    else:
        hoff = 0
    if w%3 == 2:
        woff = 1
    else:
        woff = 0
    for i in range(hoff, h+hoff):
        print(*A[i][woff:w+woff])
0