結果
| 問題 |
No.2128 Round up!!
|
| コンテスト | |
| ユーザー |
prussian_coder
|
| 提出日時 | 2022-11-20 20:00:45 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 235 bytes |
| コンパイル時間 | 242 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 77,420 KB |
| 最終ジャッジ日時 | 2024-09-21 17:54:22 |
| 合計ジャッジ時間 | 3,974 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | WA * 12 |
ソースコード
T=int(input()) import math for _ in range(T): N,A,B=map(int,input().split()) if A<B: A,B=B,A c=B//math.gcd(A,B) ans=(c-N//A)*2 if (N%A)==0 and (N%B)==0: print(0) else: if (-N%B)<(-N%A) and (N%B)!=0: ans+=1 print(ans)
prussian_coder