0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

JuliaでAtCoderのpractice contestをやってみた(1)

Posted at

はじめに

Julia言語の練習をしているのですが,AtCoderのbeginnerあたりならば手頃なのかなと思って,やってみました。こういうのって,コードを載せていいのかどうかわからないので,問題があればご連絡ください。

AtCoder

使用環境

JuliaJupyter Notebookで使っています。バージョンは1.1.1です。

AtCoderの方のJuliaのバージョンは0.5.0なので,若干違うのかな。。。とも思いましたが,とりあえずやってみることにしました。

PCはあまり関係ないかもしれませんが,MacBook Proです。

practice contest

AtCoderのpractice contestです。

A - Welcome to AtCoder

最初の問題です。

後半に,他の言語はサンプルプログラムが載っています。残念ながらJuliaはありません。。。

スクリーンショット 2019-07-26 11.36.20.png

とりあえず,何をみながらやるかということで,

Juliaをはじめる
https://hshindo.github.io/julia-doc-ja-v0.6/manual/getting-started.html
をみながらやってみました。

入出力など参考にしました。

A-WelcometoAtCoder
a=parse(Int,readline())
x=split(readline())
s=readline()
b=parse(Int,x[1])
c=parse(Int,x[2])
print(a+b+c," ",s)

最初,print(a+b+c," ",s)println(a+b+c," ",s)としていてエラーになっていました。

なんでかわからず,ちょっと悩みました。

まあ,とりあえず,うまくいったのですが,次のB - Interactive Sortingでむっちゃ悩むことになります。。。。(続く)

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?