結果
問題 |
No.48 ロボットの操縦
|
ユーザー |
|
提出日時 | 2019-03-31 20:51:10 |
言語 | Go (1.23.4) |
結果 |
WA
|
実行時間 | - |
コード長 | 428 bytes |
コンパイル時間 | 16,021 ms |
コンパイル使用メモリ | 237,396 KB |
実行使用メモリ | 6,816 KB |
最終ジャッジ日時 | 2024-11-22 09:47:27 |
合計ジャッジ時間 | 12,293 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 WA * 1 |
ソースコード
package main import ( "fmt" "math" ) func main(){ var x, y, l float64 var cnt int fmt.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++ } cnt += int(math.Ceil(math.Abs(x) / l)) cnt += int(math.Ceil(math.Abs(y) / l)) fmt.Println(cnt) }