結果

問題 No.1931 Fraction 2
ユーザー nok0
提出日時 2022-05-06 21:33:50
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 206 bytes
コンパイル時間 197 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 97,408 KB
最終ジャッジ日時 2024-07-06 17:17:13
合計ジャッジ時間 6,190 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10 TLE * 1 -- * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

from fractions import Fraction

n = int(input())
x = Fraction(0, 1)
for i in range(n):
    a, b = map(int, input().split())
    x += Fraction(a, b)
print(x.numerator % 998244353, x.denominator % 998244353)
0