結果
| 問題 |
No.915 Plus Or Multiple Operation
|
| コンテスト | |
| ユーザー |
curi_ku
|
| 提出日時 | 2019-10-26 00:32:01 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 265 bytes |
| コンパイル時間 | 87 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-11-07 03:40:49 |
| 合計ジャッジ時間 | 1,091 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 6 WA * 4 |
ソースコード
Q = int(input())
for i in range(Q):
A,B,C = [int(x) for x in input().split()]
ans = 0
if C==1:
print(A*B)
break
while A>C:
if A%C!=0:
A = A-A%C
ans+=1
A = A/C
ans+=1
if A==C:
ans+=2
if A!=1:
ans+=1
print(ans*B)
curi_ku