結果
問題 | No.48 ロボットの操縦 |
ユーザー |
|
提出日時 | 2019-03-31 20:50:48 |
言語 | Go (1.23.4) |
結果 |
WA
|
実行時間 | - |
コード長 | 449 bytes |
コンパイル時間 | 11,321 ms |
コンパイル使用メモリ | 222,152 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-22 09:46:24 |
合計ジャッジ時間 | 12,373 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 25 |
ソースコード
package mainimport ("fmt""math")func main(){var x, y, l float64var cnt intfmt.Scan(&x)fmt.Scan(&y)fmt.Scan(&l)if y < 0 {cnt++if x != 0 {cnt++}} else if y == 0 && x != 0 {cnt++} else if x != 0 {cnt++}fmt.Println(cnt)cnt += int(math.Ceil(math.Abs(x) / l))cnt += int(math.Ceil(math.Abs(y) / l))fmt.Println(cnt)}