結果

問題 No.1940 Escape through + -
ユーザー scrappy
提出日時 2022-10-18 22:49:26
言語 Go
(1.23.4)
結果
AC  
実行時間 9 ms / 2,000 ms
コード長 479 bytes
コンパイル時間 16,022 ms
コンパイル使用メモリ 221,400 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-29 04:58:18
合計ジャッジ時間 16,814 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

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