結果
問題 | No.2558 中国剰余定理 |
ユーザー | Navier_Boltzmann |
提出日時 | 2024-03-09 20:53:30 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 46 ms / 2,000 ms |
コード長 | 270 bytes |
コンパイル時間 | 347 ms |
コンパイル使用メモリ | 82,172 KB |
実行使用メモリ | 62,132 KB |
最終ジャッジ日時 | 2024-09-29 21:22:14 |
合計ジャッジ時間 | 2,881 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 |
ソースコード
from collections import * from itertools import * from functools import * from heapq import * import sys,math input = sys.stdin.readline A,B,a,b = map(int,input().split()) num=0 while True: if (A*num+a)%B==b: print(A*num+a) exit() num += 1