File tree Expand file tree Collapse file tree 2 files changed +57
-0
lines changed Expand file tree Collapse file tree 2 files changed +57
-0
lines changed Original file line number Diff line number Diff line change
1
+ package main
2
+
3
+ import (
4
+ . "fmt"
5
+ "io"
6
+ )
7
+
8
+ // github.com/EndlessCheng/codeforces-go
9
+ func CF682A (in io.Reader , out io.Writer ) {
10
+ var n , m , ans int64
11
+ Fscan (in , & n , & m )
12
+ for i := int64 (1 ); i <= 5 ; i ++ {
13
+ j := (5 - i )% 5 + i - i % 5
14
+ ans += (n - i + 5 ) / 5 * ((m - j + 5 ) / 5 )
15
+ }
16
+ Fprint (out , ans )
17
+ }
18
+
19
+ //func main() { CF682A(os.Stdin, os.Stdout) }
Original file line number Diff line number Diff line change
1
+ package main
2
+
3
+ import (
4
+ "github.com/EndlessCheng/codeforces-go/main/testutil"
5
+ "testing"
6
+ )
7
+
8
+ // https://codeforces.com/problemset/problem/682/A
9
+ // https://codeforces.com/problemset/status/682/problem/A
10
+ func TestCF682A (t * testing.T ) {
11
+ // just copy from website
12
+ rawText := `
13
+ inputCopy
14
+ 6 12
15
+ outputCopy
16
+ 14
17
+ inputCopy
18
+ 11 14
19
+ outputCopy
20
+ 31
21
+ inputCopy
22
+ 1 5
23
+ outputCopy
24
+ 1
25
+ inputCopy
26
+ 3 8
27
+ outputCopy
28
+ 5
29
+ inputCopy
30
+ 5 7
31
+ outputCopy
32
+ 7
33
+ inputCopy
34
+ 21 21
35
+ outputCopy
36
+ 88`
37
+ testutil .AssertEqualCase (t , rawText , 0 , CF682A )
38
+ }
You can’t perform that action at this time.
0 commit comments