USACO Bronze 2016 December - The Cow-Signal

Authors: Benjamin Qi, Jesse Choe

Official Analysis (Java)

C++

// Created by Jesse Choe - Bronze Template
#include <bits/stdc++.h>
using namespace std;
// Type aliases
using ll = long long;
using str = string;
using vi = vector<int>;

Python

import sys
sys.stdin = open("cowsignal.in","r")
sys.stdout = open("cowsignal.out","w")
M,N,K = map(int,input().split())
g = [input() for _ in range(M)]
for i in range(K*M):
for j in range(K*N):
print(g[i//K][j//K],end='')
print()

Join the USACO Forum!

Stuck on a problem, or don't understand a module? Join the USACO Forum and get help from other competitive programmers!