結果

問題 No.1974 2x2 Flipper
ユーザー ああいいああいい
提出日時 2022-06-12 07:17:04
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 452 bytes
コンパイル時間 331 ms
コンパイル使用メモリ 81,728 KB
実行使用メモリ 85,616 KB
最終ジャッジ日時 2023-10-24 00:04:21
合計ジャッジ時間 6,678 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,504 KB
testcase_01 AC 71 ms
76,600 KB
testcase_02 AC 48 ms
64,372 KB
testcase_03 AC 114 ms
81,948 KB
testcase_04 AC 83 ms
78,388 KB
testcase_05 WA -
testcase_06 AC 98 ms
79,960 KB
testcase_07 AC 87 ms
78,584 KB
testcase_08 AC 58 ms
74,220 KB
testcase_09 AC 98 ms
80,396 KB
testcase_10 WA -
testcase_11 AC 87 ms
79,040 KB
testcase_12 AC 119 ms
82,128 KB
testcase_13 AC 95 ms
79,420 KB
testcase_14 AC 77 ms
77,756 KB
testcase_15 AC 124 ms
83,228 KB
testcase_16 WA -
testcase_17 AC 109 ms
80,956 KB
testcase_18 AC 53 ms
73,216 KB
testcase_19 AC 64 ms
76,216 KB
testcase_20 AC 81 ms
78,364 KB
testcase_21 AC 140 ms
85,616 KB
testcase_22 AC 141 ms
85,604 KB
testcase_23 AC 145 ms
85,492 KB
testcase_24 WA -
testcase_25 AC 37 ms
53,504 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

H,W = map(int,input().split())

import sys
if H == 1 or W == 1:
    print(0)
    for h in range(H):
        for w in range(W):
            print(0,end = " ")
        print()
    exit()
ans = [[0] * W for _ in range(H)]
A = ans
if W % 2 == 1:
    wend = W - 1
else:
    wend = W
if H % 2 == 1:
    hend = H - 1
else:
    hend = H
for h in range(hend):
    for w in range(wend):
        A[h][w] = 1
print(wend * hend)
for h in range(H):
    print(*A[h])
0