結果

問題 No.915 Plus Or Multiple Operation
ユーザー sasa8uyauya
提出日時 2025-03-06 08:05:14
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 170 bytes
コンパイル時間 493 ms
コンパイル使用メモリ 82,300 KB
実行使用メモリ 67,280 KB
最終ジャッジ日時 2025-03-06 08:05:17
合計ジャッジ時間 2,504 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other RE * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

T=int(input())
for _ in range(T):
  a,b,c=map(int,input().split())
  if c==1:
    print(a*b)
    continue
  d=[]
  while a>0:
    d+=1+(a%c!=0)
    a//=c
  print((d-1)*b)
0