結果
問題 | No.146 試験監督(1) |
ユーザー | いともたやすく行われるえげつない行為 |
提出日時 | 2017-02-23 14:25:26 |
言語 | Go (1.21.3) |
結果 |
AC
|
実行時間 | 182 ms / 1,000 ms |
コード長 | 492 bytes |
コンパイル時間 | 11,035 ms |
コンパイル使用メモリ | 214,112 KB |
実行使用メモリ | 14,280 KB |
最終ジャッジ日時 | 2023-08-30 21:24:04 |
合計ジャッジ時間 | 12,388 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 182 ms
14,276 KB |
testcase_01 | AC | 181 ms
14,280 KB |
testcase_02 | AC | 182 ms
14,280 KB |
ソースコード
package main import ( "bufio" "fmt" "io" "os" ) var modVar = int64(1e9) + int64(7) func solve(in io.Reader, out, err io.Writer) { num, size, count, total := 0, int64(0), int64(0), int64(0) fmt.Fscan(in, &num) for i := 0; i < num; i++ { fmt.Fscan(in, &size, &count) size = (size + 1) / 2 total = (total + (size % modVar * (count % modVar))) % modVar } fmt.Fprintln(out,total) } func main() { br := bufio.NewReaderSize(os.Stdin, int(1e7)) solve(br, os.Stdout, os.Stderr) }