結果
| 問題 | No.46 はじめのn歩 |
| コンテスト | |
| ユーザー |
gogotea
|
| 提出日時 | 2015-03-25 15:41:50 |
| 言語 | Go1.4 (1.4.2) |
| 結果 |
AC
|
| 実行時間 | 46 ms / 5,000 ms |
| コード長 | 374 bytes |
| 記録 | |
| コンパイル時間 | 496 ms |
| コンパイル使用メモリ | 34,096 KB |
| 最終ジャッジ日時 | 2025-12-03 10:10:48 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
package main
import (
"bufio"
"fmt"
"os"
"strconv"
)
func main() {
a := nextInt()
b := nextInt()
ans := b / a
if b%a > 0 {
ans++
}
fmt.Println(ans)
}
var sc = bufio.NewScanner(os.Stdin)
func next() string {
sc.Split(bufio.ScanWords)
sc.Scan()
return sc.Text()
}
func nextInt() int {
i, e := strconv.Atoi(next())
if e != nil {
panic(e)
}
return i
}
gogotea