Loading...

Във форума е въведено ограничение, което позволява на потребителите единствено да разглеждат публикуваните въпроси.

jvelev75 avatar jvelev75 2 Точки

Programming Basic C++ - solution in Judge question

   Здравейте,

в Judge системата първоначално нямаше отделен раздел за задачите от този курс, затова решенията проверях в раздела

Home/Contests/Programming-Basics-Exercises/Simple Calculations.Днес забелязах че вече има отделен раздел специално за C++ и реших да поставя решенията и  в него. За изненада при един и същ код работещ първоначално (Solution #6948288)

сега ми дава грешен отговор (Solution #6975187).Някой да има същият проблем??

   Благодаря предварително!

.

Тагове:
0
Programming Basics
kolioi avatar kolioi 641 Точки
Дай да видим твоя код и да намерим грешката.
0
jvelev75 avatar jvelev75 2 Точки

Здравей,

решение 6948288 от Home/ Contests / Programming-Basics-Exercises / Simple Calculations - отчетено като вярно 100/100

 

#include <iostream>
#include <iomanip>

using namespace std;

int main()
{
	double r;
	double pi = 3.14159265359;
	cin >> r;
	double area = pi * r*r;
	double perimeter = 2 * pi*r;
	
	cout << fixed << setprecision(4) << area << endl;
	cout << fixed << setprecision(4) << perimeter << endl;
	
    return 0;

Същият код ( решение  6975019 ) но постнат в  Home/Contests/Programming-Basics-CPlusPlus/Simple Calculations отчетен 25/100.

#include <iostream>
#include <iomanip>

using namespace std;

int main()
{
	double r;
	double pi = 3.14159265359;
	cin >> r;
	double area = pi * r*r;
	double perimeter = 2 * pi*r;
	
	cout << fixed << setprecision(4) << area << endl;
	cout << fixed << setprecision(4) << perimeter << endl;
	
    return 0;
}

 И в двата случая е указано че кода е за C++

Благодаря

1
kolioi avatar kolioi 641 Точки

Кода ти е напълно верен. Изглежда има някакъв проблем с Джадж, защото на мен ми дава само 20/100 със същия код - минава само първия тест.

 

П.П. Стойността на π е дефинирана в хедър файла math.h

#define M_PI       3.14159265358979323846   // pi

#define _USE_MATH_DEFINES
#include <cmath>
#include <iostream>

using namespace std;

int main()
{
	double r;
	cin >> r;
  
	double area = M_PI * r * r;
	double perimeter = 2 * M_PI * r;

	cout << fixed;
  	cout.precision(4);
  	cout << area << endl << perimeter << endl;

	return 0;
}

https://msdn.microsoft.com/en-us/library/4hwaceh6.aspx

1
20/03/2018 16:16:06
jvelev75 avatar jvelev75 2 Точки

Здравей,

макар и малко късно - благодаря за помощта

0
shethal avatar shethal 2 Точки

Basics of C++

In this section we will cover the basics of C++, it will include the syntax, variable, operators, loop types, pointers, references and information about other requirements of a C++ program. You will come across lot of terms that you have already studied in C language.

Syntax and Structure of C++ program

Here we will discuss one simple and basic C++ program to print "Hello this is C++" and its structure in parts with details and uses.

First C++ program

#include <iostream.h>
using namespace std;
int main()
{
cout << "Hello this is C++";
}

https://www.besanttechnologies.com/training-courses/python-training-institute-in-chennai

 

1
tocnaza avatar tocnaza 2 Точки

more links info:

https://www.reverbnation.com/zoraya
http://prince.org/profile/zoraya
https://www.choralnet.org/members/tocnaza/
https://oss.deltares.nl/web/delft3d/home/-/message_boards/message/1977515/maximized
https://community.sdl.com/product-groups/sdl-tridion-dx/tridion-sites/f/291/t/20332
https://www.studentfilmmakers.com/members/tocnaza/profile/
http://www.niooz.fr/users/tocnaza/Quique
https://www.eeweb.com/profile/sara-zambola
https://www.corejoomla.com/profile/tocnaza.html
https://forum.tp-link.com/member.php?122676-zoraya
https://huzzaz.com/collection/relatos-xxx
https://www.curriki.org/oer/Bego-madrastra-ejemplar/
https://community.progress.com/community_groups/products_enhancements/i/business_rules_management_system_corticon/clases_privadas
https://www.fimfiction.net/user/334838/tocnaza/about
https://developer.gracenote.com/resovled-new-client-id-registration-issue
https://blogs.allnokia.ru/u/1130093/3476/
https://cults3d.com/es/usuarios/tocnaza
http://forum.moex.com/viewtopic.asp?t=35943
http://www.supportduweb.com/profile-43919.html
https://www.steinberg.net/forums/memberlist.php?mode=viewprofile&u=54472
https://phidgets.com/phorum/memberlist.php?mode=viewprofile&u=21709
https://themeegg.com/support-forum/users/tocnaza/
https://precisethemes.com/support-forum/users/tocnaza/
https://up-campus.org/membres/818313
https://www.thinglink.com/user/937014724434853891
https://www.caminosantiago.com/foro/viewtopic.php?f=10&t=25351
https://www.cosis.net/members/profile.php?user=u05a0b3501218076bcb66ff
https://community.progress.com/community_groups/products_enhancements/i/business_rules_management_system_corticon/nuri_y_mis_amigos
http://www.mappery.com/user.php?name=tocnaza
https://solutions-summit.org/users/juancax
https://www.provenexpert.com/juanca-lina/
https://foro.skylium.com/tema-Convertir-Docx-a-Pdf-online
https://yoreparo.com/computadoras/preguntas/1115302/despues-de-un-rato-de-escuchar-music-no-da-audio-el-portatil

0
getsurveyus avatar getsurveyus 0 Точки

Here is a list of sites with online judges (and similar) and a large variety of problems: IPSC (Internet Problem Solving Contest) ... Basics of Digital Systems, Number Systems, Boolean Logic. Language by Bjarne Stroustrup. telljdpower

0
saralee123 avatar saralee123 1 Точки

TokyoTechie.Com is a leading digital marketing company which provides SEO services in Pune so you can get a high ranking on Google and helps you with our unique Seo Services.  It is quality, Result Oriented, and complete digital marketing agency in Pune.

0
Keerthana avatar Keerthana 0 Точки

Excellent Blogs!!!Keep sharing with us,Looking for Python Training Visit here

<a href="https://www.acte.in/python-training-in-chennai"> python training in chennai </a> | <a href="https://www.acte.in/python-training-in-annanagar"> python training in annanagar</a> | <a href="https://www.acte.in/python-training-in-omr"> python training in omr</a> | <a href="https://www.acte.in/python-training-in-porur"> python training in porur</a> | <a href="https://www.acte.in/python-training-in-tambaram">python training in tambaram</a> | <a href="https://www.acte.in/python-training-in-velachery"> python training in velachery</a>

 

0
dataprogram avatar dataprogram 0 Точки

This is an excellent post I seen thanks to share it. It is really what I wanted to see hope in future you will continue for sharing such a excellent post.

Data Science Course

0
dataprogram avatar dataprogram 0 Точки

If you don"t mind proceed with this extraordinary work and I anticipate a greater amount of your magnificent blog entries.

Data Science Training
 

0
Можем ли да използваме бисквитки?
Ние използваме бисквитки и подобни технологии, за да предоставим нашите услуги. Можете да се съгласите с всички или част от тях.
Назад
Функционални
Използваме бисквитки и подобни технологии, за да предоставим нашите услуги. Използваме „сесийни“ бисквитки, за да Ви идентифицираме временно. Те се пазят само по време на активната употреба на услугите ни. След излизане от приложението, затваряне на браузъра или мобилното устройство, данните се трият. Използваме бисквитки, за да предоставим опцията „Запомни Ме“, която Ви позволява да използвате нашите услуги без да предоставяте потребителско име и парола. Допълнително е възможно да използваме бисквитки за да съхраняваме различни малки настройки, като избор на езика, позиции на менюта и персонализирано съдържание. Използваме бисквитки и за измерване на маркетинговите ни усилия.
Рекламни
Използваме бисквитки, за да измерваме маркетинг ефективността ни, броене на посещения, както и за проследяването дали дадено електронно писмо е било отворено.