A Math Challenge
题号:NC225759
时间限制:C/C++/Rust/Pascal 3秒,其他语言6秒
空间限制:C/C++/Rust/Pascal 512 M,其他语言1024 M
64bit IO Format: %lld

题目描述

Given a, b, c, p, q and n, please calculate

输入描述:

The first and only line contains 6 integers a, b, c, p, q, n (, , ).

输出描述:

Output one line which contains a single integer. As the output can be very large, please output it modulo 998244353.
示例1

输入

复制
1 1 1 1 1 1

输出

复制
3
示例2

输入

复制
1 1 4 5 1 4

输出

复制
1267
示例3

输入

复制
8 9 3 8 9 3

输出

复制
811685801