A. Alyona and Numbers

Posted towerbird

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了A. Alyona and Numbers相关的知识,希望对你有一定的参考价值。

 

http://codeforces.com/contest/682/problem/A

 

 1 import java.util.ArrayList;
 2 import java.util.Scanner;
 3 
 4 public class Main 
 5     public static void main(String[] args) 
 6         Scanner io = new Scanner(System.in);
 7         int n = io.nextInt(), m = io.nextInt();
 8         long ans = 0;
 9         for (int i = 1, y; i <= n; i++) 
10             y = 5 - (i % 5);
11             if (y == 0) y += 5;
12             if (y > m) continue;
13             ans += (m - y) / 5 + 1;
14         
15         System.out.println(ans);
16     
17 
18 
19 

 

以上是关于A. Alyona and Numbers的主要内容,如果未能解决你的问题,请参考以下文章

H - Alyona and Spreadsheet

B - Alyona and mex

cf682E Alyona and Triangles

Codeforces Round #381 (Div. 2) Alyona and mex

CF739B Alyona and a tree 树上差分

CodeForces 740A Alyona and copybooks