Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
33493 | 611434WZC | [CSP-J2021]分糖果 | C++ | 运行出错 | 0 | 0 MS | 240 KB | 280 | 2021-12-06 14:03:49 |
#include<bits/stdc++.h> using namespace std; int main() { freopen("candy.in","r",stdin); freopen("candy.out","w",stdout); long long r , y , z ; cin >> r >> y >> z ; y = y/r*r+r; if(y <= z) cout << r-1; else cout << z - z/r*r ; return 0; }