- 【基础题】截钢管
142
- 2023-9-2 15:40:09 @
#include<bits/stdc++.h> using namespace std; int main() { int a=369,b=69,c=39; int num69=0,num39=0,min=39; a=a-b; for(int i=1;a>b+c;a=a-b,i++) { int j=a/c; if(min>a-jc) { num69=i; num39=j; min=a-jc; } } cout<<num69<<" "<<num39<<" "<<min; return 0; }
0 comments
No comments so far...
Information
- ID
- 204
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 9
- Tags
- # Submissions
- 139
- Accepted
- 40
- Uploaded By