LUCKY713 - Lucky 7, Unlucky 13
The numbers 7 and 13 are always fighting with each other. 7 says he’s lucky, and calls 13 unlucky and upsets him. One day, 7 decided not to fight with 13 anymore. He called 13 and said, “Let’s work together and not fight anymore. Your job is to find the sum of the multiples of 7 and 13, lower than the specified input number.
Input
The first line in the data set is an integer T (1 <= T <= 100) that represents the number of test cases that follow. Each test case contains one integer N (1 <= N <= 10^8).
Output
For each test case print the summation. See sample input and output for exact format.
Example
Input: 3 256 100 38 Output: Case 1: 6859 Case 2: 1008 Case 3: 144
hide comments
iseng_cuk:
2020-06-04 07:09:28
need explanation (e.g. case 1). |
|
wisfaq:
2016-12-13 10:13:12
@ahsa: thanks for updating the language restrictions. |
|
wisfaq:
2016-12-11 15:17:44
Move to tutorial please
|
|
vengatesh15:
2016-12-11 12:16:39
Simple AP
|
Added by: | Asha |
Date: | 2016-12-11 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: GOSU |
Resource: | Problem Setter: Md. Ashraful Islam, Lecturer, Dept. of CSE, Varendra University |