3261 - IP_2025_YOU_MID Scoreboard

Time

2025/10/28 15:25:00 2025/10/28 18:30:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
14797 Factor
14798 Quiz Score Analyzer
14799 Casting the Emperor (Reverse)
14800 Substring Counter (Longer substring)
14801 launch.json

14797 - Factor   

Description

給定一個正整數 n,請找出所有能整除 n 的正整數,但不包含 1 與 n 本身。

將這些因數由小到大排序後輸出,每個數字之間以逗號, 分隔。

若沒有符合條件的因數,請輸出:

This number has no factors other than 1 and itself.

 

Input

輸入一行,包含一個正整數 n:

n

 

Note:

1. 1 ≤ n ≤ 100,000

Output

若有其他因數:

x1, x2, x3, ..., xn

 

若無其他因數:

This number has no factors other than 1 and itself.

 

Note:

1. 最後一個數字後不可有多餘空格,但要有換行符號 \n

2.最大測資為 1,000,000 時,最多也只會輸出約 100 個因數,不會造成效能問題。

Sample Input  Download

Sample Output  Download

Tags




Discuss




14798 - Quiz Score Analyzer   

Description

輸入 N 個成績(0~100 的整數),請統計並輸出以下資訊:

1.及格(>=60)的人數

2.不及格的人數

3.最高分與最低分

4.平均分數(取到小數點後一位)

5.及格率(百分比,取整數 %)

Input

第一行為一個正整數N (N<=50),接下來一行為N個整數成績。

Output

輸出5行:

Pass: X

Fail: Y

Highest: Z, Lowest: W

Average: A

Pass Rate: B%

 

Note:

1. 輸出的最後必須要有一個換行符號 (“\n”)

 

Sample Input  Download

Sample Output  Download

Tags




Discuss




14799 - Casting the Emperor (Reverse)   

Description

導演想在演員中挑選一位飾演皇帝。

共有 n 位演員(編號 1~n)站成一個圓圈。

遊戲規則如下:

第一輪從第 1 位演員開始,按照 順時針方向數數,每次數到第 k 位演員淘汰。

淘汰後,從被淘汰演員的下一位開始,改變方向(如果上一輪順時針,下一輪就逆時針,依此類推)。

每輪按照上述方向數到第 k 位演員淘汰。

持續進行直到只剩下一位演員。

最後剩下的演員就是導演選出的「皇帝」。

 

Input

輸入包含一行,內有兩個整數:

1. n:演員人數 (1 ≤ n ≤ 10)

2. k:數到第幾位要淘汰 (1 ≤ k ≤ 100)

 

Output

輸出兩行:

淘汰順序,以空格分隔

格式:Elimination order: X1 X2 X3 ...

最後剩下的演員

格式:The Emperor: Y

 

Note:

1. 輸出的最後必須要有一個換行符號 (“\n”)

 

Sample Input  Download

Sample Output  Download

Tags




Discuss




14800 - Substring Counter (Longer substring)   

Description

輸入一個字串 str 與一個目標子字串 sub,請找出該子字串在字串中出現的所有位置(大小寫不分)。

若有出現,輸出位置及總次數:

Found X times at positions: P1, P2, ..., PX

若沒有出現,輸出:

Not Found

 

Input

1.第一行:字串 str(長度 ≤ 50)

2.第二行:子字串 sub(長度 ≤ 50)

 

Note:

1.str 與 sub 可包含大小寫英文字母。

2.字串長度不超過 50 個字元(最多 50 個字元)。

 

Output

如果有找到,輸出:

Found X times at positions: P1, P2, ..., PX

若沒找到則輸出:

Not Found

 

Note:

1.輸出的最後必須要有一個換行符號 (\n)。

2.P1, P2, ... 為子字串 sub(不分大小寫)出現的起始位置。

 

Sample Input  Download

Sample Output  Download

Tags




Discuss




14801 - launch.json   

Description

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch",
            "type": "cppdbg",
            "request": "launch",
            "preLaunchTask": "hwbuild",
            "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${fileDirname}",
            "environment": [],
            "externalConsole": true,
            "miDebuggerPath": "C:\\x86_64-15.2.0-release-posix-seh-msvcrt-rt_v13-rev0\\mingw64\\bin\\gdb.exe",
            "MIMode": "gdb"
        }
    ]
}

Input

Output

Sample Input  Download

Sample Output  Download

Tags




Discuss