結果

問題 No.56 消費税
ユーザー gogotea
提出日時 2015-03-25 15:10:34
言語 Go1.4
(1.4.2)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 367 bytes
コンパイル時間 2,191 ms
コンパイル使用メモリ 32,584 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-18 01:51:48
合計ジャッジ時間 3,446 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

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