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

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

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 while (x != 1)
13 {
14 for(int i=2 ; i<10 ; i++){
15 if(x % i == 0){
16 x = x / i;
17 counter++;
18 break;
19 }
20 }
21 }
22
23
24 cout << counter + 1 ;
25
26 return 0;
27}
کد ارسال‌شده برای داوری خودکار هاتکدز UTF-8