結果

問題 No.46 はじめのn歩
ユーザー O20LQ7O20LQ7
提出日時 2022-11-12 23:40:54
言語 Go
(1.22.1)
結果
AC  
実行時間 378 ms / 5,000 ms
コード長 301 bytes
コンパイル時間 11,399 ms
コンパイル使用メモリ 203,272 KB
実行使用メモリ 4,372 KB
最終ジャッジ日時 2023-10-12 12:39:38
合計ジャッジ時間 12,082 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,372 KB
testcase_04 AC 1 ms
4,348 KB
testcase_05 AC 2 ms
4,352 KB
testcase_06 AC 1 ms
4,372 KB
testcase_07 AC 2 ms
4,352 KB
testcase_08 AC 378 ms
4,348 KB
testcase_09 AC 1 ms
4,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	sc := bufio.NewScanner(os.Stdin)

	sc.Scan()
	v := strings.Fields(sc.Text())
	s1, _ := strconv.Atoi(v[0])
	s2, _ := strconv.Atoi(v[1])
	step := 1

	for n := s1; n < s2; n += s1 {
		step += 1
	}

	fmt.Println(step)
}
0