Go: package main

import (
	"bufio"
	"os"
	"fmt"
	"strings"
	)

var scanner = bufio.NewScanner(os.Stdin)
var title = [4]int{0, 90, 180, 270}

func main() {
	p := make([][]string, 8)
	for i := range p {
		scanner.Scan()
		p[i] = strings.Split(scanner.Text(), "")
	}
	// log.Println(p)
	for i := 1; i < 4; i++ {
		fmt.Println(title[i])
		p = spin(p)
		print_p(p)
	}
}

func spin(p [][]string) [][]string {
	ret := make([][]string, 8)
	for i := range ret {
		ret[i] = make([]string, 8)
	}
	for i := 0; i < 8; i++ {
		for j := 0; j < 8; j++ {
			ret[i][j] = p[7-j][i]
		}
	}
	return ret
}

func print_p(p [][]string) {
	for _, v := range p {
		fmt.Println(strings.Join(v, ""))
	}
}

C++: #include "bits/stdc++.h"
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
char a[8][8],b[8][8];
int main(){
rep(i,8)cin>>a[i];
rep(i,8)rep(j,8)b[j][7-i]=a[i][j];
cout<<"90"<<endl;
rep(i,8){rep(j,8){cout<<b[i][j];}cout<<endl;};

rep(i,8)rep(j,8)b[7-i][7-j]=a[i][j];
cout<<"180"<<endl;
rep(i,8){rep(j,8){cout<<b[i][j];}cout<<endl;};

rep(i,8)rep(j,8)b[7-j][i]=a[i][j];
cout<<"270"<<endl;
rep(i,8){rep(j,8){cout<<b[i][j];}cout<<endl;};

return 0;
}

C++: #include <iostream>
using namespace std;
char field[8][8];
char tempfield[8][8];

void rot() {
  for(int i=0;i<8;i++) {
    for(int j=0;j<8;j++) {
      tempfield[j][7-i] = field[i][j];
    }
  }

  for(int i=0;i<8;i++) {
    for(int j=0;j<8;j++) {
      field[i][j] = tempfield[i][j];
    }
  }

}

int main() {
  for(int i=0;i<8;i++) {
    for(int j=0;j<8;j++) {
      cin >> field[i][j];
    }
  }
  rot();
  cout << 90 << endl;
  for(int i=0;i<8;i++) {
    for(int j=0;j<8;j++) {
      cout << field[i][j];
    }
    cout << endl;
  }
  rot();
  cout << 180 << endl;
  for(int i=0;i<8;i++) {
    for(int j=0;j<8;j++) {
      cout << field[i][j];
    }
    cout << endl;
  }
  rot();
  cout << 270 << endl;
  for(int i=0;i<8;i++) {
    for(int j=0;j<8;j++) {
      cout << field[i][j];
    }
    cout << endl;
  }
}

C++: #include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    vector<string> s(8);
    for(int i=0; i<8; ++i)
        cin >> s[i];

    for(int i=0; i<3; ++i){
        vector<string> ret(8, string(8, ' '));
        for(int j=0; j<8; ++j){
            for(int k=0; k<8; ++k){
                ret[k][7-j] = s[j][k];
            }
        }

        cout << ((i+1)*90) << endl;
        for(int j=0; j<8; ++j)
            cout << ret[j] << endl;

        s = ret;
    }

    return 0;
}

C++: #include <map>
#include <set>
#include <list>
#include <cmath>
#include <queue>
#include <stack>
#include <cstdio>
#include <string>
#include <vector>
#include <complex>
#include <cstdlib>
#include <cstring>
#include <numeric>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <functional>

#define mp       make_pair
#define pb       push_back
#define all(x)   (x).begin(),(x).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define repi(i,a,b) for(int i = (a); i < (b); i++)

using namespace std;

typedef    long long          ll;
typedef    unsigned long long ull;
typedef    vector<bool>       vb;
typedef    vector<int>        vi;
typedef    vector<vb>         vvb;
typedef    vector<vi>         vvi;
typedef    pair<int,int>      pii;

const int INF=1<<29;
const double EPS=1e-9;

const int dx[]={1,0,-1,0},dy[]={0,-1,0,1};

int main(){
	char board[10][10];
	rep(i, 8)rep(j, 8){
		cin>>board[i][j];
	}
	for(int i =90;i <=270;i+=90){
		char tmp[10][10];
		cout <<i<<endl;
		for(int j = 0;j <8;j++){
			for(int k = 0;k <8;k++){
				tmp[j][k]=board[7-k][j];
			}
		}
		rep(j,8){
			rep(k,8){
				cout <<tmp[j][k];
			}
			cout <<endl;
		}
		rep(j, 8)rep(k, 8)board[i][j]=board[i][j];

	}
	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<map>
#include<string>
using namespace std;
int main(){
    char s[10][10];
    for(int i=0;i<8;i++)cin>>s[i];

    cout<<90<<endl;
    for(int i=0;i<8;i++){
        for(int j=7;j>=0;j--)cout<<s[j][i];
        cout<<endl;
    }


    cout<<180<<endl;
    for(int i=0;i<8;i++){
        for(int j=0;j<8;j++)cout<<s[j][i];
        cout<<endl;
    }

    cout<<270<<endl;
    for(int i=7;i>=0;i--){
        for(int j=0;j<8;j++)cout<<s[j][i];
        cout<<endl;
    }
}

C++: #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
const ld eps = 1e-9;

vector<string>a(vector<string>b) {
	vector<string>ans(8, string(8, 'a'));
	for (int i = 0; i < 8; ++i) {
		for (int j = 0; j < 8; ++j) {
			ans[7 - j][i] = b[i][j];
		}
	}
	return ans;
}

int main() {
	vector<string>sts(8);
	for (int i = 0; i < 8; ++i) {
		cin >> sts[i];
	}
	for (int i = 0; i < 3; ++i) {
		cout << 90+90 * i << endl;
		sts = a(a(a(sts)));
		for (int j = 0; j < 8; ++j) {
			cout << sts[j] << endl;
		}
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
char c[8][8];
int main(){
for(int i=0;i<64;i++)cin>>c[i/8][i%8];
cout<<90<<endl;
for(int i=0;i<8;i++){
for(int j=0;j<8;j++){
cout<<c[7-j][i];
}
cout<<endl;
}
cout<<180<<endl;
for(int i=0;i<8;i++){
for(int j=0;j<8;j++){
cout<<c[7-i][7-j];
}
cout<<endl;
}
cout<<270<<endl;
for(int i=0;i<8;i++){
for(int j=0;j<8;j++){
cout<<c[j][7-i];
}
cout<<endl;
}
}

C++: #include <stdio.h>
#include <string.h>
#include <ctype.h>
int main ( void ) {
    char input[8][8]={};
    int i,t;
    for(i=0;i<8;i++){//入力
        scanf("%s",input[i]);
    }
    puts("90");
    for(i=7;i>=0;i--){
        for(t=0;t<8;t++){
            printf("%c",input[i][t]);
        }
        puts("");
    }
    puts("180");
    for(i=7;i>=0;i--){
        for(t=7;t>=0;t--){
            printf("%c",input[i][t]);
        }
        puts("");
    }
    puts("270");
    for(i=0;i<8;i++){
        for(t=7;t>=0;t--){
            printf("%c",input[i][t]);
        }
        puts("");
    }
    
    
    return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
#include<climits>
#include<string>
#include<vector>
#include<list>
#include<map>
#include<set>
#include<cmath>
#include<queue>
#include<cstring>
#include<stack>
#include<functional>
using namespace std;
#define int long long

signed main(){
	int N,V,sum=0;
	cin>>N;
	for(int i=0;i<N;i++){
		cin>>V; sum += V;
	}
	if(N==0) puts("0");
	else printf("%lld\n",sum/N);
	return 0;
}