質問編集履歴

1

型の変更

2021/05/29 00:42

投稿

encho
encho

スコア182

test CHANGED
File without changes
test CHANGED
@@ -64,7 +64,7 @@
64
64
 
65
65
  ```c++
66
66
 
67
- bool IsPrime(int num)
67
+ bool IsPrime(long long num)
68
68
 
69
69
  {
70
70
 
@@ -76,7 +76,7 @@
76
76
 
77
77
  double sqrtNum = sqrt(num);
78
78
 
79
- for (int i = 3; i <= sqrtNum; i += 2)
79
+ for (long long i = 3; i <= sqrtNum; i += 2)
80
80
 
81
81
  {
82
82