Submission #1556085
Source Code Expand
#include<iostream> using namespace std; int main() { int first_number; cout<<"Enter First Number : "; cin>>first_number; if(first_number < 0) cout << "Please enter a positive number" << endl; cin >> first_number; int second_number; cout<<"Enter Second Number: "; cin>>second_number; if(second_number < 0) cout << "Please enter a positive number" << endl; cin >> second_number; int gcd; for(int i=1;i<=first_number&&i<=second_number;i++){ if(first_number%i==0 && second_number%i == 0 ){ gcd=i; } } cout<<"Greatest Common Divison (GCD):"<<gcd<<endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | D - Decrementing |
User | vjudge1 |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 576 Byte |
Status | WA |
Exec Time | 2103 ms |
Memory | 256 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 1000 | ||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample1.txt, sample2.txt, sample3.txt |
All | sample1.txt, sample2.txt, sample3.txt, in1.txt, in10.txt, in11.txt, in12.txt, in13.txt, in14.txt, in15.txt, in16.txt, in17.txt, in18.txt, in19.txt, in2.txt, in20.txt, in21.txt, in22.txt, in23.txt, in24.txt, in25.txt, in26.txt, in27.txt, in28.txt, in29.txt, in3.txt, in30.txt, in31.txt, in32.txt, in33.txt, in34.txt, in35.txt, in36.txt, in37.txt, in4.txt, in5.txt, in6.txt, in7.txt, in8.txt, in9.txt, sample1.txt, sample2.txt, sample3.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
in1.txt | WA | 392 ms | 256 KB |
in10.txt | WA | 213 ms | 256 KB |
in11.txt | WA | 1961 ms | 256 KB |
in12.txt | WA | 71 ms | 256 KB |
in13.txt | TLE | 2103 ms | 256 KB |
in14.txt | WA | 462 ms | 256 KB |
in15.txt | WA | 909 ms | 256 KB |
in16.txt | WA | 460 ms | 256 KB |
in17.txt | WA | 950 ms | 256 KB |
in18.txt | WA | 164 ms | 256 KB |
in19.txt | WA | 508 ms | 256 KB |
in2.txt | WA | 1814 ms | 256 KB |
in20.txt | WA | 936 ms | 256 KB |
in21.txt | WA | 802 ms | 256 KB |
in22.txt | WA | 1752 ms | 256 KB |
in23.txt | TLE | 2103 ms | 256 KB |
in24.txt | WA | 344 ms | 256 KB |
in25.txt | WA | 271 ms | 256 KB |
in26.txt | TLE | 2103 ms | 256 KB |
in27.txt | WA | 262 ms | 256 KB |
in28.txt | WA | 1373 ms | 256 KB |
in29.txt | WA | 264 ms | 256 KB |
in3.txt | WA | 143 ms | 256 KB |
in30.txt | WA | 430 ms | 256 KB |
in31.txt | WA | 637 ms | 256 KB |
in32.txt | WA | 270 ms | 256 KB |
in33.txt | WA | 49 ms | 256 KB |
in34.txt | WA | 321 ms | 256 KB |
in35.txt | WA | 149 ms | 256 KB |
in36.txt | WA | 1 ms | 256 KB |
in37.txt | WA | 1 ms | 256 KB |
in4.txt | WA | 495 ms | 256 KB |
in5.txt | WA | 1089 ms | 256 KB |
in6.txt | WA | 1442 ms | 256 KB |
in7.txt | WA | 1842 ms | 256 KB |
in8.txt | WA | 1035 ms | 256 KB |
in9.txt | WA | 1108 ms | 256 KB |
sample1.txt | WA | 1 ms | 256 KB |
sample2.txt | WA | 1 ms | 256 KB |
sample3.txt | WA | 1 ms | 256 KB |