問題一覧 > ショートコード

No.3383 1122-like Number (C++)

レベル : / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / スペシャルジャッジ問題 (複数の解が存在する可能性があります)
タグ : (解説公開後に AC するまで非表示) / 解いたユーザー数 10
作問者 : alcea / テスター : naka9 tRue Rho 259-Momone
お気に入りにしたユーザー ProblemId : 12842 / 自分の提出
問題文最終更新日: 2025-11-22 12:42:01
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest TSG LIVE! 15 コードゴルフコンテスト (順位表) の他の問題:

Problem Statement

A positive integer that can be expressed as the product of $4$ distinct primes is called a 1122-like number.
For example, $1122=2\times 3\times 11\times 17$ and $210=2\times 3\times 5\times 7$ are 1122-like numbers, while $12=2^2\times 3$ and $81=3^4$ are not 1122-like numbers.
Given an integer $N$, find the number of 1122-like numbers less than or equal to $N$.

Input

$N$

  • $1 \leq N \leq 3.5\times 10^6$
  • All inputs are integers.

Output

Print a newline at the end.

Score

Intended solution: $137$ bytes

Score formula When the code length of a submitted source code is $x$ and the code length of the intended solution for this problem is $y$, the score of that source code is calculated as follows.
  • If $y\leq x$: $\lfloor100\exp(-0.012(x-y))\rfloor$ points
  • If $x<y$: $101$ points
The score for this problem is the maximum score among the source codes submitted to this problem.

Sample

Sample 1
Input
500
Output
4

There are $4$ 1122-like numbers less than or equal to $500$: $210, 330, 390, 462$.

Sample 2
Input
1122
Output
18

Sample 3
Input
3000000
Output
305541

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。