mirror of
https://github.com/xlucn/PAT.git
synced 2026-08-18 01:18:40 +08:00
simplify read process using the return value of scanf
This commit is contained in:
+3
-7
@@ -56,13 +56,9 @@ int Rev(int N, int D)
|
||||
int main()
|
||||
{
|
||||
int N, D;
|
||||
scanf("%d", &N);
|
||||
while(N >= 0)
|
||||
{
|
||||
scanf("%d", &D);
|
||||
|
||||
while(scanf("%d %d", &N, &D) == 2)
|
||||
puts(iPrime(N) && iPrime(Rev(N, D)) ? "Yes" : "No");
|
||||
scanf("%d", &N);
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user