結果
問題 |
No.2058 Binary String
|
ユーザー |
![]() |
提出日時 | 2022-09-01 19:58:12 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 294 bytes |
コンパイル時間 | 214 ms |
コンパイル使用メモリ | 82,456 KB |
実行使用メモリ | 151,988 KB |
最終ジャッジ日時 | 2024-11-14 11:09:02 |
合計ジャッジ時間 | 56,070 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 TLE * 1 |
other | AC * 6 TLE * 17 |
ソースコード
import sys input=lambda:sys.stdin.readline().rstrip() mod=998244353 N,K=map(int,input().split()) def p(a,b): temp=a ans=1 while b>0: if b%2: ans=(ans*temp)%mod b//=2 temp=(temp*temp)%mod return ans C=1 ans=0 for l in range(N): ans=(ans+C*p(l,K))%mod C=C*(N-1-l)//(l+1) print(ans)