#29579: C++紀錄


e3524167 (Kenlogin)


#include <iostream>

#include <string> 

#include <sstream>

 

using namespace std;

int main()

{

int x,res=0;

while (cin >> x)

{

for (int i = 1; i <= x; i++)

{

if (i <= 10)

{

res = res + 6;

}

if (i >= 11 && i <= 20)

{

res = res + 2;

}

if (i >= 21 && i <= 40)

{

res = res + 1;

}

if (i >= 41)

{

res = 100;

}

}

cout << res << endl;

res = 0;

}

}