結果
| 問題 |
No.8062 A + B
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-04-01 22:33:26 |
| 言語 | Ruby (3.4.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 694 bytes |
| コンパイル時間 | 41 ms |
| コンパイル使用メモリ | 7,424 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2024-06-27 11:47:14 |
| 合計ジャッジ時間 | 1,629 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 3 WA * 5 |
コンパイルメッセージ
Syntax OK
ソースコード
def f(s) if s=='0' then return 0 end if s=='1' then return 1 end if s=='2' then return 2 end if s=='3' then return 3 end if s=='4' then return 4 end if s=='5' then return 5 end if s=='6' then return 6 end if s=='7' then return 7 end if s=='8' then return 8 end if s=='9' then return 9 end if s=='-1' then return -1 end if s=='-2' then return -2 end if s=='-3' then return -3 end if s=='-4' then return -4 end if s=='-5' then return -5 end if s=='-6' then return -6 end if s=='-7' then return -7 end if s=='-8' then return -8 end if s=='-9' then return -9 end s.to_i end a,b=gets.split p f(a)+f(b)