結果
| 問題 | No.1052 電子機器X |
| コンテスト | |
| ユーザー |
Raymin012
|
| 提出日時 | 2020-05-15 22:51:55 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 467 bytes |
| 記録 | |
| コンパイル時間 | 322 ms |
| コンパイル使用メモリ | 20,824 KB |
| 実行使用メモリ | 168,880 KB |
| 最終ジャッジ日時 | 2026-04-07 23:04:08 |
| 合計ジャッジ時間 | 3,466 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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