結果

問題 No.1940 Escape through + -
ユーザー scrappy
提出日時 2022-10-18 22:49:26
言語 Go
(1.25.7)
コンパイル:
env GOCACHE=/tmp go build _filename_
実行:
./Main
結果
AC  
実行時間 6 ms / 2,000 ms
コード長 479 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 14,372 ms
コンパイル使用メモリ 281,584 KB
実行使用メモリ 7,900 KB
最終ジャッジ日時 2026-03-18 14:29:56
合計ジャッジ時間 15,536 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

package main

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

func main() {
	sc := bufio.NewScanner(os.Stdin)
	sc.Buffer(make([]byte, 100000*11+2), 100000*11+2)
	sc.Scan()
	ss := strings.Fields(sc.Text())
	//N, _ := strconv.Atoi(ss[0])
	M, _ := strconv.Atoi(ss[1])
	S, _ := strconv.Atoi(ss[2])
	sc.Scan()
	tt := strings.Fields(sc.Text())
	for _, t := range tt {
		a, _ := strconv.Atoi(t)
		S -= a
	}
	if S%M == 0 {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}
0