提出 #75891480
ソースコード 拡げる
W,H = map(int,input().split())
for h in range(1,H+1):
ans = ""
for w in range(1,W+1):
if W == 1 and H == 1:
print(0)
break
elif (w == 1 and h == 1) or (w == 1 and h == H) or (w == W and h == 1) or (w == W and h == H):
ans += "2"
elif w == 1 or w == W or h == 1 or h == H:
ans += "3"
else:
ans += "4"
print(ans)
提出情報
| 提出日時 | |
|---|---|
| 問題 | B - Count Adjacent Cells |
| ユーザ | meibe |
| 言語 | Python (CPython 3.13.7) |
| 得点 | 0 |
| コード長 | 377 Byte |
| 結果 | WA |
| 実行時間 | 12 ms |
| メモリ | 9084 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 0 / 200 | ||||||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | 00-sample-01.txt, 00-sample-02.txt, 00-sample-03.txt |
| All | 00-sample-01.txt, 00-sample-02.txt, 00-sample-03.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt, 01-10.txt, 01-11.txt, 01-12.txt, 01-13.txt, 01-14.txt, 01-15.txt, 01-16.txt, 01-17.txt, 01-18.txt, 01-19.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 00-sample-01.txt | WA | 11 ms | 9064 KiB |
| 00-sample-02.txt | AC | 11 ms | 9072 KiB |
| 00-sample-03.txt | WA | 11 ms | 9072 KiB |
| 01-01.txt | WA | 11 ms | 9084 KiB |
| 01-02.txt | WA | 11 ms | 9008 KiB |
| 01-03.txt | WA | 11 ms | 8964 KiB |
| 01-04.txt | WA | 11 ms | 8936 KiB |
| 01-05.txt | WA | 11 ms | 9064 KiB |
| 01-06.txt | WA | 11 ms | 9064 KiB |
| 01-07.txt | WA | 11 ms | 9084 KiB |
| 01-08.txt | WA | 11 ms | 8920 KiB |
| 01-09.txt | WA | 11 ms | 8992 KiB |
| 01-10.txt | WA | 11 ms | 8956 KiB |
| 01-11.txt | WA | 11 ms | 8996 KiB |
| 01-12.txt | WA | 11 ms | 8920 KiB |
| 01-13.txt | WA | 12 ms | 9064 KiB |
| 01-14.txt | WA | 11 ms | 8992 KiB |
| 01-15.txt | WA | 11 ms | 9060 KiB |
| 01-16.txt | WA | 11 ms | 8996 KiB |
| 01-17.txt | WA | 11 ms | 8920 KiB |
| 01-18.txt | WA | 11 ms | 9072 KiB |
| 01-19.txt | WA | 11 ms | 9064 KiB |