結果
問題 | No.98 円を描こう |
ユーザー |
![]() |
提出日時 | 2015-05-14 05:53:13 |
言語 | Go (1.23.4) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 333 bytes |
コンパイル時間 | 10,445 ms |
コンパイル使用メモリ | 224,400 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-10 04:25:46 |
合計ジャッジ時間 | 10,977 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 6 |
ソースコード
package mainimport ("fmt""math")func main() {var x, y int64fmt.Scan(&x, &y)z := math.Sqrt(float64(x*x+y*y))if z == 0 {fmt.Println("1")} else if z == float64(int64(z)) {fmt.Println(math.Ceil(z)*2+1)}else if int(z) != int(z-0.5) {fmt.Println(math.Ceil(z-1)*2+1)}else {fmt.Println(math.Ceil(z)*2)}}