用户输出
1
998244349
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#2450 | #1002. 找倍数 | Wrong Answer | 0 | 459 ms | 2836 K | Python 3 / 439 B | FRED | 2023-11-17 21:35:34 |
#!/usr/bin/env python
# coding: utf-8
# In[1]:
def find_k(N):
MOD = 998244353
# 计算 N 对 MOD 的模
k = N % MOD
# 如果 k 在 0 到 MOD - 1 之间,则直接返回 k
# 否则,返回 k 减去 MOD,保证结果在指定范围内
return k if k < MOD else k - MOD
# 测试样例
print(find_k(998244354)) # 应该输出 1
print(find_k(-9982443534)) # 应该输出 998244349
用户输出
1
998244349
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
1
998244349
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
1
998244349
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
1
998244349
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
1
998244349
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
1
998244349
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
1
998244349
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
1
998244349
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
1
998244349
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
1
998244349
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
1
998244349
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
1
998244349
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
1
998244349
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
1
998244349
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0