题目地址:http://poj.org/problem?id=3006 刷了好多水题,来找回状态...... Dirichlet's Theorem on Arithmetic Progressions Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 16803 Accepted: 8474 Description If a and d are relatively prime positive integers, t…
Dirichlet's Theorem on Arithmetic Progressions Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 13636 Accepted: 6808 Description If a and d are relatively prime positive integers, the arithmetic sequence beginning with a and increasing…
Dirichlet's Theorem on Arithmetic Progressions Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 16733 Accepted: 8427 Description If a and d are relatively prime positive integers, the arithmetic sequence beginning with a and increasing…
http://poj.org/problem?id=3006 #include<stdio.h> #include<math.h> int is_prime(int n) { int i,m; ) ; m = sqrt(n); ; i <= m; i ++) { ) ; } ; } int main() { int a,d,n,i; while(~scanf("%d%d%d",&a,&d,&n)) { ; &&d==…