結果

問題 No.56 消費税
コンテスト
ユーザー gogotea
提出日時 2015-03-25 15:10:34
言語 Go1.4
(1.4.2)
結果
AC  
実行時間 20 ms / 5,000 ms
コード長 367 bytes
コンパイル時間 415 ms
コンパイル使用メモリ 34,004 KB
最終ジャッジ日時 2025-12-03 10:10:36
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

package main

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

func main() {
	D := nextInt()
	P := nextInt()

	price := D * (100 + P) / 100
	fmt.Println(price)
}

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
}
0