CSES - HIIT Open 2019 - Results
Submission details
Task:Alien Invasion II
Sender:Team Lewd
Submission time:2019-05-25 12:51:18 +0300
Language:C++
Status:READY
Result:
Test results
testverdicttime
#10.03 sdetails
#20.02 sdetails
#30.03 sdetails

Code

#include<iostream>
#include<algorithm>

using namespace std;
int main()
{
	long b=0;
	cin>>b;
	int a=b;
	int summa=0;
	int jakaja=10;
	for(int i=1; i<31; i++){
		summa += (a%jakaja)/(jakaja/10);
		a-= a%jakaja;
		jakaja*=10;
	}
	if(summa%3==0){
		
		
	} else{
		cout<<"jee";
		int miinus=10;
		for(int i=0; i<30; i++){
			if (b-miinus<0){
				b+=miinus*(b%3);
				cout<<b;
				break;
			}
			miinus*=10;
			cout<<miinus;}}
	cout<<b;
	cout<<3<<" "<<b/3;
}

Test details

Test 1

Verdict:

input
2368469234876449

correct output
22368469234876449
3 7456156411625483

user output
23684692348764493 789489744958...

Test 2

Verdict:

input
292929292929292929292929292931

correct output
129292929292929292929292929293...

user output
jee100100010000100000100000010...
Truncated

Test 3

Verdict:

input
292929292929292929292929292979

correct output
129292929292929292929292929297...

user output
jee100100010000100000100000010...
Truncated