Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
150060 李洋洋-胖胖老师 统计硬币 C++ Accepted 2 MS 280 KB 427 2026-03-21 18:49:38

Tests(1/1):


Code:

#include<iostream> using namespace std; int main(){ int T; cin >> T; while (T--){ int n,m; cin >> n >> m; int cnt = 0; for (int z = 0; z <= n && z * 5 <= m;++z){ int y = (m - n) - 4 * z; int x = n - y - z; if (x >= 0 && y >= 0){ cnt++; } } cout << cnt << endl; } return 0; }