上一版是数学解法,这一版就是纯计算机解法。
#include<bits/stdc++.h>
using namespace std;
int main(){
int N;
cin>>N;
int s5 = N%4;//剩余五元的张数
int s20 = N/4;//二十元的张数
cout<<s20<<" "<<s5;
return 0;
}
上一版是数学解法,这一版就是纯计算机解法。
#include<bits/stdc++.h>
using namespace std;
int main(){
int N;
cin>>N;
int s5 = N%4;//剩余五元的张数
int s20 = N/4;//二十元的张数
cout<<s20<<" "<<s5;
return 0;
}