Submission #1279242

#TimeUsernameProblemLanguageResultExecution timeMemory
1279242SmuggingSpunPot (COCI15_pot)C++20
50 / 50
1 ms576 KiB
#include<bits/stdc++.h>
#define taskname "A"
using namespace std;
int main(){
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	if(fopen(taskname".inp", "r")){
		freopen(taskname".inp", "r", stdin);
	}
	int n, ans = 0;
	cin >> n;
	for(int _ = 0; _ < n; _++){
		int x;
		cin >> x;
		ans += pow(x / 10, x % 10);
	}
	cout << ans;
}

Compilation message (stderr)

pot.cpp: In function 'int main()':
pot.cpp:7:24: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
    7 |                 freopen(taskname".inp", "r", stdin);
      |                 ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...