Created
January 17, 2020 09:48
-
-
Save yajamon/8e46b072ae7c25c8bf32cb48aa5a9317 to your computer and use it in GitHub Desktop.
paiza 解答セットアップ swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| readonly DOC_ROOT=$(cd $(dirname ${BASH_SOURCE:-$0})/.. ; pwd) | |
| if [ -z $1 ]; then | |
| exit 1; | |
| fi | |
| cd $DOC_ROOT | |
| mkdir -p $1/src | |
| cat << EOT > $1/Makefile | |
| run: | |
| swift src/main.swift < example.txt | |
| EOT | |
| cat << EOT > $1/src/main.swift | |
| let input_line=readLine()! | |
| let splits = input_line.split(separator:" ") | |
| print(splits) | |
| EOT | |
| cat << EOT > $1/example.txt | |
| 1 2 | |
| EOT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment