Problem1124--【入门】姐妹数对1124: 【入门】姐妹数对
Time Limit: 1 Sec Memory Limit: 32 MB
Submit: 2 Solved: 2
[Submit] [Status] [Web Board] [Creator:]Description
给定两个不同的正整数x,y,若x+y能被3除尽或能被7除尽,则称x,y为姐妹数对。例如:
2,4;2,5;为姐妹数对。
3,14; 不是姐妹数对。
那么,对给出的一个整数n(1≤n≤100), 1,2,…,n之间有多少个姐妹数。
Input
一个整数n
Output
一个整数,即1~n之间姐妹数对的个数。
Sample Input
6
Sample Output
8
Source/Category
[Submit] [Status]