Submission #2698689


Source Code Expand

import sys

def getinputdata():

    # 配列初期化
    array_result = []
    
    data = input()
    
    array_result.append(data.split(" "))

    flg = 1

    try:

        while flg:

            data = input()

            if(data != ""):
                
                array_result.append(data.split(" "))

            else:

                flg = 0
    finally:

        return array_result

def primejudge(mysum):
    
    i = 2
    
    chkflg=False
    while i < (mysum//2)+1 :

        if mysum % i == 0:
            
            chkflg=True
    
        else:

            i += 1

        if chkflg:
            
            break
            
    return chkflg

arr_data = getinputdata()

n = int(arr_data[0][0])-1

arr_result=[]

while n>=2:
    
    if not primejudge(n):
        
        arr_result.append(n)
    
    n-=1
        
print(len(arr_result))        

Submission Info

Submission Time
Task A - 与えられた数より小さい素数の個数について
User senshi2000
Language Python (3.4.3)
Score 100
Code Size 952 Byte
Status AC
Exec Time 584 ms
Memory 3064 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 90
Set Name Test Cases
All 00_sample1, 00_sample2, 00_sample3, 10_testcase00, 10_testcase01, 10_testcase02, 10_testcase03, 10_testcase04, 10_testcase05, 10_testcase06, 10_testcase07, 10_testcase08, 10_testcase09, 10_testcase10, 10_testcase11, 10_testcase12, 10_testcase13, 10_testcase14, 10_testcase15, 10_testcase16, 10_testcase17, 10_testcase18, 10_testcase19, 10_testcase20, 10_testcase21, 10_testcase22, 10_testcase23, 10_testcase24, 10_testcase25, 10_testcase26, 10_testcase27, 10_testcase28, 10_testcase29, 10_testcase30, 10_testcase31, 10_testcase32, 10_testcase33, 10_testcase34, 10_testcase35, 10_testcase36, 10_testcase37, 10_testcase38, 10_testcase39, 10_testcase40, 10_testcase41, 10_testcase42, 10_testcase43, 10_testcase44, 10_testcase45, 10_testcase46, 10_testcase47, 10_testcase48, 10_testcase49, 10_testcase50, 10_testcase51, 10_testcase52, 10_testcase53, 10_testcase54, 10_testcase55, 10_testcase56, 10_testcase57, 10_testcase58, 10_testcase59, 10_testcase60, 10_testcase61, 10_testcase62, 10_testcase63, 10_testcase64, 10_testcase65, 10_testcase66, 10_testcase67, 10_testcase68, 10_testcase69, 10_testcase70, 10_testcase71, 10_testcase72, 10_testcase73, 10_testcase74, 10_testcase75, 10_testcase76, 10_testcase77, 10_testcase78, 10_testcase79, 10_testcase80, 10_testcase81, 10_testcase82, 10_testcase83, 10_testcase84, 10_testcase85, 10_testcase86
Case Name Status Exec Time Memory
00_sample1 AC 18 ms 3064 KB
00_sample2 AC 18 ms 3064 KB
00_sample3 AC 584 ms 3064 KB
10_testcase00 AC 290 ms 3064 KB
10_testcase01 AC 18 ms 3064 KB
10_testcase02 AC 403 ms 3064 KB
10_testcase03 AC 33 ms 3064 KB
10_testcase04 AC 25 ms 3064 KB
10_testcase05 AC 17 ms 3064 KB
10_testcase06 AC 47 ms 3064 KB
10_testcase07 AC 487 ms 3064 KB
10_testcase08 AC 212 ms 3064 KB
10_testcase09 AC 488 ms 3064 KB
10_testcase10 AC 23 ms 3064 KB
10_testcase11 AC 50 ms 3064 KB
10_testcase12 AC 18 ms 3064 KB
10_testcase13 AC 18 ms 3064 KB
10_testcase14 AC 142 ms 3064 KB
10_testcase15 AC 61 ms 3064 KB
10_testcase16 AC 521 ms 3064 KB
10_testcase17 AC 31 ms 3064 KB
10_testcase18 AC 37 ms 3064 KB
10_testcase19 AC 166 ms 3064 KB
10_testcase20 AC 17 ms 3064 KB
10_testcase21 AC 110 ms 3064 KB
10_testcase22 AC 17 ms 3064 KB
10_testcase23 AC 249 ms 3064 KB
10_testcase24 AC 24 ms 3064 KB
10_testcase25 AC 82 ms 3064 KB
10_testcase26 AC 548 ms 3064 KB
10_testcase27 AC 43 ms 3064 KB
10_testcase28 AC 255 ms 3064 KB
10_testcase29 AC 20 ms 3064 KB
10_testcase30 AC 51 ms 3064 KB
10_testcase31 AC 17 ms 3064 KB
10_testcase32 AC 361 ms 3064 KB
10_testcase33 AC 298 ms 3064 KB
10_testcase34 AC 249 ms 3064 KB
10_testcase35 AC 34 ms 3064 KB
10_testcase36 AC 17 ms 3064 KB
10_testcase37 AC 18 ms 3064 KB
10_testcase38 AC 37 ms 3064 KB
10_testcase39 AC 17 ms 3064 KB
10_testcase40 AC 18 ms 3064 KB
10_testcase41 AC 367 ms 3064 KB
10_testcase42 AC 369 ms 3064 KB
10_testcase43 AC 88 ms 3064 KB
10_testcase44 AC 142 ms 3064 KB
10_testcase45 AC 65 ms 3064 KB
10_testcase46 AC 17 ms 3064 KB
10_testcase47 AC 459 ms 3064 KB
10_testcase48 AC 325 ms 3064 KB
10_testcase49 AC 98 ms 3064 KB
10_testcase50 AC 94 ms 3064 KB
10_testcase51 AC 145 ms 3064 KB
10_testcase52 AC 17 ms 3064 KB
10_testcase53 AC 247 ms 3064 KB
10_testcase54 AC 151 ms 3064 KB
10_testcase55 AC 108 ms 3064 KB
10_testcase56 AC 21 ms 3064 KB
10_testcase57 AC 535 ms 3064 KB
10_testcase58 AC 579 ms 3064 KB
10_testcase59 AC 18 ms 3064 KB
10_testcase60 AC 208 ms 3064 KB
10_testcase61 AC 136 ms 3064 KB
10_testcase62 AC 96 ms 3064 KB
10_testcase63 AC 18 ms 3064 KB
10_testcase64 AC 17 ms 3064 KB
10_testcase65 AC 559 ms 3064 KB
10_testcase66 AC 342 ms 3064 KB
10_testcase67 AC 277 ms 3064 KB
10_testcase68 AC 517 ms 3064 KB
10_testcase69 AC 23 ms 3064 KB
10_testcase70 AC 471 ms 3064 KB
10_testcase71 AC 457 ms 3064 KB
10_testcase72 AC 193 ms 3064 KB
10_testcase73 AC 413 ms 3064 KB
10_testcase74 AC 17 ms 3064 KB
10_testcase75 AC 24 ms 3064 KB
10_testcase76 AC 140 ms 3064 KB
10_testcase77 AC 17 ms 3064 KB
10_testcase78 AC 44 ms 3064 KB
10_testcase79 AC 76 ms 3064 KB
10_testcase80 AC 20 ms 3064 KB
10_testcase81 AC 460 ms 3064 KB
10_testcase82 AC 257 ms 3064 KB
10_testcase83 AC 68 ms 3064 KB
10_testcase84 AC 367 ms 3064 KB
10_testcase85 AC 417 ms 3064 KB
10_testcase86 AC 130 ms 3064 KB