結果
問題 | No.2888 Mamehinata |
ユーザー |
|
提出日時 | 2024-09-18 22:52:37 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 558 bytes |
コンパイル時間 | 222 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-09-18 22:52:43 |
合計ジャッジ時間 | 5,292 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 52 |
ソースコード
n, m = int(input())point = []for i in range(n):if i == 0:point.append(2)else:point.append(0)for i in range(n):if i == 0:if point[n-1] or point[1] == 2:point[0] = 1elif point[0] == 2:point[0] = 0else:point[0] = 1elif i == n-1:if point[0] or point[n-2] == 2:point[0] = 1elif point[i] == 2:point[i] == 0else:point[i] = 1else:if point[i-1] or point[i+1] == 2:point[i] = 1elif point[i] == 2:point[i] == 0else:point[i] = 1num = point.count(2)print(num)