Source Code
#include <iostream>
using namespace std;
int KAGE(int n) {
	int sum = 0;
	for (int i = 0; i < n; i++) {
		int num;
		cin >> num;
		if (num >= 10) {
			num = num % 10;
		}
		sum = sum + num;
	}

}

int main() {
	long n;
	cin >> n;
	cout << endl;
	int b = KAGE(n);

	return 0;
}
Copy
The Tale of a Generous Prince mohammad_abuTaleb
GNU G++17
2039 ms
232 KB
Time Limit Exceeded