結果
| 問題 | No.1281 Cigarette Distribution |
| コンテスト | |
| ユーザー |
taiga000629
|
| 提出日時 | 2020-11-06 21:57:28 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 485 bytes |
| 記録 | |
| コンパイル時間 | 284 ms |
| コンパイル使用メモリ | 84,944 KB |
| 実行使用メモリ | 81,156 KB |
| 最終ジャッジ日時 | 2026-04-03 09:07:20 |
| 合計ジャッジ時間 | 1,988 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 WA * 20 |
ソースコード
n,m=map(int,input().split())
mod=10**9+7
for x in range(1,m+1):
if x==n:
print(0)
else:
if n%x==0:
print(pow(n//x,x,mod))
else:
hon=n//x
amari=n-x*hon
if hon>1:
print(pow(hon+1,amari,mod)*pow(hon,x-amari,mod)%mod)
else:
if x-amari>1:
print(0)
else:
print(pow(hon+1,amari,mod)*pow(hon,x-amari,mod)%mod)
taiga000629