NOIP2012普及组初赛及答案(C++)
输入:1 2 5
输出:______________ 2.
#include <iostream> using namespace std; int n,i,ans; int main() { } 输入:18
输出:_____________ 3.
#include <iostream> using namespace std; int n,i,j,a[100][100]; int solve(int x,int y) { }
int main() {
cin>>n;
for(i=1;i<=n;i++)
for(j=1;j<=i;j++) cin>>a[i][j]; int u,v;
if(x==n) return a[x][y]; u=solve(x+1,y); v=solve(x+1,y+1); if(u>v) return a[x][y]+u; else return a[x][y]+v; cin>>n; ans=0;
for(i=1;i<=n;i++)
if(n%i==0) ans++; cout<<ans<<endl; return 0;