結果
| 問題 |
No.1052 電子機器X
|
| コンテスト | |
| ユーザー |
Raymin012
|
| 提出日時 | 2020-05-15 22:51:55 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 467 bytes |
| コンパイル時間 | 223 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 91,992 KB |
| 最終ジャッジ日時 | 2024-09-19 12:09:30 |
| 合計ジャッジ時間 | 2,779 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | TLE * 1 -- * 15 |
ソースコード
n,k = map(int,input().split())
ans = []
cnt = 1
for i in range(2**k):
lists = []
cnt = 1
for j in range(k):
if ((i >> j) & 1):
lists.append(1)
else:
lists.append(0)
for num in lists:
if num == 0:
cnt -= 1
elif num == 1:
cnt += 1
if cnt > n:
cnt = 1
elif cnt <= 0:
cnt = n
ans.append(cnt)
print(len(set(ans)))
Raymin012