結果
問題 | No.419 直角三角形 |
ユーザー |
|
提出日時 | 2016-09-24 16:40:11 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 117 ms / 1,000 ms |
コード長 | 64 bytes |
コンパイル時間 | 55 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-12-26 06:41:04 |
合計ジャッジ時間 | 3,651 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
コンパイルメッセージ
Main.rb:1: warning: `:' after local variable or literal is interpreted as binary operator Main.rb:1: warning: even though it seems like symbol literal Syntax OK
ソースコード
a,b=gets.split.map &:to_i;p Math.sqrt a==b ?2*a*a :(a*a-b*b).abs