#include <iostream> using namespace std; int main( ) { int a[4],b[4]; int i,j,tmp; for (i=0;i<4;i++) cin >> b[i]; for (i=0;i<4;i++) { a[i]=0; for (j=0;j<=i;j++) { a[i]+=b[j]; b[a[i]%4]+=a[j]; } } tmp=1; for (i=0;i<4;i++) { a[i]%=10; b[i]%=10; tmp*=a[i]+b[i]; } cout << tmp << endl; return 0; }输入:2 3 5 7
输出:1