Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
随便水水就过了……#include <iostream> #include <cstdio> #include <cstring> using namespace std; int main(){ int T, n; scanf("%d", &T); while (T--){ scanf("%d", &n); int i = 2, ans = 1; do{ if (i * i > n) { ans *= 9; break; } int cnt = 0; while ((n % i) == 0) cnt++, n /= i; if (cnt) ans *= (cnt + 2) * (cnt + 2) * (cnt + 1) * (cnt + 1) / 4; i++; }while (n > 1); printf("%d\n", ans); } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator