結果
| 問題 | No.407 鴨等素数間隔列の数え上げ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-08-05 23:14:47 |
| 言語 | Ruby (4.0.2) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 176 bytes |
| 記録 | |
| コンパイル時間 | 727 ms |
| コンパイル使用メモリ | 8,832 KB |
| 実行使用メモリ | 95,232 KB |
| 最終ジャッジ日時 | 2026-05-07 09:02:18 |
| 合計ジャッジ時間 | 3,398 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 5 |
| other | TLE * 1 -- * 30 |
コンパイルメッセージ
Syntax OK
ソースコード
n,l=gets.split.map &:to_i a=Array.new(l,1) for i in 2..3200;if a[i]then for j in 2..l/i;a[i*j]=nil end;end;end s=0 for i in 2..l/(n-1);if a[i]then s+=l-(n-1)*i+1 end;end puts s