Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: Catpao

Problemset: จับคู่เลขมงคล

Language: cpp

Time: 0.004 second

Submitted On: 2025-09-29 08:57:52

#include<bits/stdc++.h>
using namespace std;
int d[100];
int main()
{
	int n,l;
	cin>>n;
	bool a = false;
	for(int i=0;i<n;i++){
		cin>>d[i];
	}
	cin>>l;
	for(int i=0;i<n;i++){
		for(int j=i+1;j<n;j++){
			if(d[i] + d[j] == l){
				cout<<d[i]<<' '<<d[j]<<"\n";
				a = true;
			}
		}
	}
	if(a == false){
		cout<<"No";
	}
}