結果
| 問題 | No.1281 Cigarette Distribution | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2021-06-18 14:23:38 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 446 bytes | 
| コンパイル時間 | 548 ms | 
| コンパイル使用メモリ | 82,464 KB | 
| 実行使用メモリ | 76,720 KB | 
| 最終ジャッジ日時 | 2024-06-22 06:52:13 | 
| 合計ジャッジ時間 | 3,374 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 4 WA * 19 | 
ソースコード
n,m=map(int,input().split())
mod=10**9+7
"""
2*x-1回目ではじめて正の得点を得れる
"""
#print(n)
for x in range(1,m+1):
  if 2*x-1>n:
    print(0)
    continue
  tmp=1
  t=n//x
  p=n%x
  if p==x-1:
    tmp*=pow(t,x-p,mod)
    tmp*=pow(t+1,p,mod)
  elif p==0:
    tmp*=pow(t-1,1,mod)
    tmp*=pow(t,x-2,mod)
    tmp*=pow(t+1,1,mod)
  else:
    tmp*=pow(t-1,1,mod)
    tmp*=pow(t,x-p,mod)
    tmp*=pow(t+1,p+1,mod)
  print(tmp%mod)
            
            
            
        