- 循环基础题2
1234567890
- 2024-3-31 15:03:18 @
#include <bits/stdc++.h>
using namespace std;
int main()
{
int a=0;
for(int i=1;i<=100;i++)
{
if(i%2!=0&&i%3!=0)
{
a=a+i;
}
}
cout<<a<<endl;
return 0;
}
0 comments
No comments so far...
Information
- ID
- 821
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 7
- Tags
- # Submissions
- 99
- Accepted
- 20
- Uploaded By