#pragma GCC optimize("Ofast") #include #define int long long using namespace std; void fileio(const string &s) { freopen((s+".in").c_str(),"r",stdin); freopen((s+".out").c_str(),"w",stdout); } const int INF=4e18; inline int read() { int x=0; bool flag=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') flag=0; c=getchar(); } while(c>='0'&&c<='9') { x=(x<<1)+(x<<3)+c-'0'; c=getchar(); } return (flag?x:~(x-1)); } int t,k,a,b; int mod=998244353; int qp(int x,int y) { if(x<=1) return x; if(y==0) return 1; if(y==1) return x; int ans=qp(x,y/2); (ans*=ans)%=mod; if(y&1) (ans*=x)%=mod; return ans; } void solve() { a=read(); b=read(); k=read(); int c=qp(2,k/2); (a*=c)%=mod; (b*=c)%=mod; if(k&1) cout<<(a+b)%mod<<" "<<(a-b+mod)%mod<