結果
問題 | No.48 ロボットの操縦 |
ユーザー |
|
提出日時 | 2019-03-31 21:07:48 |
言語 | Go (1.23.4) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 383 bytes |
コンパイル時間 | 14,732 ms |
コンパイル使用メモリ | 219,176 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-22 10:24:40 |
合計ジャッジ時間 | 14,370 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 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 += 2} else if y == 0 && x != 0 {cnt++} else if x != 0 {cnt++}cnt += int(math.Ceil(math.Abs(x) / l))cnt += int(math.Ceil(math.Abs(y) / l))fmt.Println(cnt)}