Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
90560 sh25_shenpy 转圈游戏(Day 1) C++ 通过 0 MS 252 KB 352 2026-06-06 13:01:19

Tests(10/10):


#include <bits/stdc++.h> using namespace std; typedef long long LL; LL ksm(LL a, LL b, LL p) { LL ans = 1; while (b) { if (b & 1) ans = ans * a % p; a = a * a % p; b >>= 1; } return ans; } int main() { int n, m, k, x; cin >> n >> m >> k >> x; cout << (x % n + m % n * ksm(10, k, n) % n) % n << endl; return 0; }


测评信息: