結果
問題 | No.1514 Squared Matching |
ユーザー |
![]() |
提出日時 | 2021-05-21 23:44:08 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 1,432 ms / 4,000 ms |
コード長 | 215 bytes |
コンパイル時間 | 300 ms |
コンパイル使用メモリ | 82,088 KB |
実行使用メモリ | 466,612 KB |
最終ジャッジ日時 | 2024-10-10 10:18:39 |
合計ジャッジ時間 | 24,403 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 26 |
ソースコード
n = int(input()) r = [1]*(n+1) ans = 0 for i in range(1,n+1): if r[i] == 0: continue c = 0 for j in range(1,n+1): if i*j*j > n: break c += 1 r[i*j*j] = 0 ans += c*c print(ans)