結果
| 問題 | No.915 Plus Or Multiple Operation |
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2019-10-25 21:36:33 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 322 bytes |
| 記録 | |
| コンパイル時間 | 409 ms |
| コンパイル使用メモリ | 84,864 KB |
| 実行使用メモリ | 71,040 KB |
| 最終ジャッジ日時 | 2026-05-07 11:30:16 |
| 合計ジャッジ時間 | 7,130 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | TLE * 1 -- * 9 |
ソースコード
Q=int(input())
for testcases in range(Q):
A,B,C=map(int,input().split())
count=0
while A>(C-1)*2:
if A%C==0:
A//=C
count+=1
else:
A=A//C*C
count+=1
#print(A)
if A<C:
count+=1
else:
count+=2
print(count*B)
titia