結果
| 問題 |
No.2451 Redistribute Integers
|
| コンテスト | |
| ユーザー |
ID 21712
|
| 提出日時 | 2024-11-14 09:18:30 |
| 言語 | Go (1.23.4) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 299 bytes |
| コンパイル時間 | 15,811 ms |
| コンパイル使用メモリ | 239,544 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-14 09:18:48 |
| 合計ジャッジ時間 | 16,045 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 WA * 8 |
ソースコード
package main
import . "fmt"
import . "os"
import bf "bufio"
func main() {
rd:=bf.NewReader(Stdin)
var a,b,n,s int64
Fscan(rd,&n,&a)
s+=a
for ;n>1;n-- {
Fscan(rd,&b)
s+=b
d:=b-a
if d/n*n!=d{
Println("No")
return
}
}
if s/n*n!=s {
Println("No")
return
}
Println("Yes")
}
ID 21712