結果
問題 |
No.2649 [Cherry 6th Tune C] Anthem Flower
|
ユーザー |
![]() |
提出日時 | 2024-02-23 21:41:52 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 337 bytes |
コンパイル時間 | 326 ms |
コンパイル使用メモリ | 81,844 KB |
実行使用メモリ | 76,284 KB |
最終ジャッジ日時 | 2024-09-29 05:59:09 |
合計ジャッジ時間 | 8,597 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 RE * 21 |
ソースコード
T=int(input()) for i in range(T): #D,A=map(int,input().split()) N,M=input().split() #N=int(input()) #X=list(map(int, input().split())) M=int(M);NN=int(N) #ansb=((1+NN)*NN//2)%M M*=2 now=0;p=1 for s in N[::-1]: s=int(s) now+=p*s now%=M p*=10 p%=M d=(now*(now+1)) ans=d%M print(ans//2)