提出 #75841089


ソースコード 拡げる

h,w=map(int,input().split())

for y in range(h):
  for x in range(w):
    ans=4
    if y==0:
      ans-=1
    if y==h-1:
      ans-=1
    if x==0:
      ans-=1
    if x==w-1:
      ans-=1
    print(ans,end="")
    if x!=w-1:
      print(" ",end="")
  print()
    

提出情報

提出日時
問題 B - Count Adjacent Cells
ユーザ st0123
言語 Python (PyPy 3.11-v7.3.20)
得点 200
コード長 280 Byte
結果 AC
実行時間 65 ms
メモリ 97456 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 3
AC × 22
セット名 テストケース
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 AC 46 ms 79584 KiB
00-sample-02.txt AC 45 ms 79608 KiB
00-sample-03.txt AC 45 ms 79848 KiB
01-01.txt AC 44 ms 79380 KiB
01-02.txt AC 44 ms 79420 KiB
01-03.txt AC 45 ms 79608 KiB
01-04.txt AC 45 ms 79380 KiB
01-05.txt AC 46 ms 79324 KiB
01-06.txt AC 46 ms 79376 KiB
01-07.txt AC 46 ms 79496 KiB
01-08.txt AC 46 ms 79324 KiB
01-09.txt AC 47 ms 79412 KiB
01-10.txt AC 46 ms 79956 KiB
01-11.txt AC 46 ms 79700 KiB
01-12.txt AC 47 ms 79740 KiB
01-13.txt AC 65 ms 97456 KiB
01-14.txt AC 53 ms 89068 KiB
01-15.txt AC 47 ms 80444 KiB
01-16.txt AC 58 ms 94732 KiB
01-17.txt AC 47 ms 79632 KiB
01-18.txt AC 51 ms 87528 KiB
01-19.txt AC 46 ms 79524 KiB