Problem:
Score : 100 points

Problem Statement

Given is a three-digit integer N. Does N contain the digit 7?

If so, print Yes; otherwise, print No.

Constraints

100 \leq N \leq 999

Input

Input is given from Standard Input in the following format:

N

Output

If N contains the digit 7, print Yes; otherwise, print No.

Sample Input 1

117

Sample Output 1

Yes

117 contains 7 as its last digit.

Sample Input 2

123

Sample Output 2

No

123 does not contain the digit 7.

Sample Input 3

777

Sample Output 3

Yes

Solution in C (GCC 9.2.1) (judge verdict: Wrong Answer)

#include <stdio.h>
int main(){
	long long int n,threes,fives,fifteens,sum=0;
	scanf("%lld",&n);
	threes=(long long int)(n/3);
	threes=3*(threes)*(threes+1)/2;
	fives=(long long int)(n/5);
	fives=5*(fives)*(fives+1)/2;
	fifteens=(long long int)(n/15);
	fifteens=15*fifteens*(fifteens+1)/2;
	sum=(n*(n+1)/2)+fifteens-fives-threes;
	printf("%lld\n",sum);
	return 0;
}