提出 #1231620


ソースコード 拡げる

a,b,c = gets.split.map{|n| n.to_i}

puts (b-a === c-b) ? 'YES' : 'NO'

提出情報

提出日時
問題 A - ι⊥l
ユーザ rinkou
言語 C++14 (GCC 5.4.1)
得点 0
コード長 73 Byte
結果 CE

コンパイルエラー

./Main.cpp:3:22: warning: multi-character character constant [-Wmultichar]
 puts (b-a === c-b) ? 'YES' : 'NO'
                      ^
./Main.cpp:3:30: warning: multi-character character constant [-Wmultichar]
 puts (b-a === c-b) ? 'YES' : 'NO'
                              ^
./Main.cpp:1:1: error: ‘a’ does not name a type
 a,b,c = gets.split.map{|n| n.to_i}
 ^
./Main.cpp:3:6: error: expected constructor, destructor, or type conversion before ‘(’ token
 puts (b-a === c-b) ? 'YES' : 'NO'
      ^