| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 159607 | 张宇泽 | 【基础题】买钢笔 | C++ | Wrong Answer | 1 MS | 272 KB | 442 | 2026-09-05 16:31:47 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,a,b,c,maxn=-1; cin>>n; for(int i=0;i*6<=n;i++) for(int j=0;i*6+j*5<=n;j++){ int r=n-i*6-j*5; if(r%4==0){ int k=r/4; if(i+j+k>maxn){ maxn=i+j+k; a=i;b=j;c=k; } } } cout<<a<<" "<<b<<" "<<c; return 0; }
------Input------
998
------Answer-----
1 0 248
------Your output-----
0 2 247