結果
問題 | No.2194 兄弟の掛け引き |
ユーザー |
![]() |
提出日時 | 2025-03-20 21:08:19 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 38 ms / 1,000 ms |
コード長 | 415 bytes |
コンパイル時間 | 173 ms |
コンパイル使用メモリ | 82,836 KB |
実行使用メモリ | 53,632 KB |
最終ジャッジ日時 | 2025-03-20 21:09:02 |
合計ジャッジ時間 | 1,398 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 |
ソースコード
A, B, C = map(int, input().split())candidates = []# Check case 1: X = C, valid if C <= Bif C <= B:candidates.append(C)# Always add case 2: X = C + Bcandidates.append(C + B)result = set()for x in candidates:if x % A == 0 and x >= A:n = x // Aresult.add(n)sorted_result = sorted(result)if not sorted_result:print(-1)else:for num in sorted_result:print(num)