arrow_forward همه ارسال‌ها

جزئیات ارسال کد#394

code_blocks
مسئله مربوطه: ماراتون پینگ پنگ (#16) arrow_outward
verified
وضعیت داوری نهایی: پاسخ نادرست تست 3
terminal
زبان برنامه‌نویسی: C++
schedule
ارسال‌کننده و زمان:
Hamidreza Babaiee (۲ سال پیش)
descriptionsolution.cpp ۳۰ خط • ۴۷۵ بایت
1#include<iostream>
2#include<stdio.h>
3
4using namespace std;
5
6int main(){
7
8 int x =0;
9 cin >> x;
10 int counter = 0 ;
11
12 int m = 2;
13 for(int i=2 ; i<10 ; ++i){
14 i = m;
15 if(x % i != 0){
16 m++;
17 continue;
18 }else{
19 x = x / i;
20 counter++;
21 m = i;
22 }
23 }
24
25
26
27 cout << counter + 1 ;
28
29 return 0;
30}
کد ارسال‌شده برای داوری خودکار هاتکدز UTF-8