結果
問題 |
No.3278 Avoid Division
|
ユーザー |
![]() |
提出日時 | 2025-09-19 23:05:38 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 501 bytes |
コンパイル時間 | 299 ms |
コンパイル使用メモリ | 82,840 KB |
実行使用メモリ | 59,796 KB |
最終ジャッジ日時 | 2025-09-19 23:05:47 |
合計ジャッジ時間 | 4,382 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 23 WA * 1 |
ソースコード
N = int(input()) OP = [list(input().split()) for _ in range(N)] ans = [] ans.append(("add", "b", "b", "A[1]")) for i, (op, A) in enumerate(OP): A = int(A) if op == "+": ans.append(("mul", "c", "A["+str(i+1)+"]", "b")) ans.append(("add", "a", "a", "c")) elif op == "*": ans.append(("mul", "a", "a", "A["+str(i+1)+"]")) else: ans.append(("mul", "b", "b", "A["+str(i+1)+"]")) ans.append(("div", "a", "a", "b")) print(len(ans)) for a in ans: print(*a)