2012年3月1日 星期四

[USACO] sec1-5_Superprime_Rib

又是玩弄質數題

簡而言之就是要你找從左邊數過來1位 2位 3位 ...都是質數的數字

ex:
7 是質數
71 是質數
719 是質數
7193 也是質數

so 7193符合條件


難得第一次送出就AC

USER: Lee Pu [leepupu1]
TASK: sprime
LANG: C++

Compiling...
Compile: OK

Executing...
Test 1: TEST OK [0.000 secs, 3184 KB]
Test 2: TEST OK [0.000 secs, 3184 KB]
Test 3: TEST OK [0.000 secs, 3184 KB]
Test 4: TEST OK [0.000 secs, 3184 KB]
Test 5: TEST OK [0.000 secs, 3184 KB]

All tests OK.
YOUR PROGRAM ('sprime') WORKED FIRST TIME! That's fantastic
-- and a rare thing. Please accept these special automated
congratulations.

Here are the test data inputs:

------- test 1 ----
4
------- test 2 ----
5
------- test 3 ----
6
------- test 4 ----
7
------- test 5 ----
8
Keep up the good work!
Thanks for your submission!

The Code

沒有留言:

張貼留言