竞赛
考级
#include<bits/stdc++.h> using namespace std; int main() { int x; cin>>x; int s=x/4; int y=x%4; if(y0) { cout<<"0 0 "<<s; } if(y1) { cout<<"0 1 "<<s-1; } if(y2) { cout<<"1 0 "<<s-1; } if(y3) { if(s>=2) { cout<<"1 1 "<<s-2; } else { cout<<"1 0 "<<s-1; } } }
账号已注销
x = int(input()) a = 0 b = 0 c = 0 n = x%4 if n == 0: c = x / 4 if n == 1: c = (x-5)/4 b = 1 if n == 2: c = (x-6)/4 a = 1 if n == 3: if x < 7: c = 0 a = 1 b = 1 else: c = (x-11)/4 a = 1 b = 1 c = round(c) print(a,b,c)
WZA