結果

問題 No.508 超ゆとり教育
ユーザー WA_TLEWA_TLE
提出日時 2017-04-28 22:39:22
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 613 bytes
コンパイル時間 577 ms
コンパイル使用メモリ 70,636 KB
実行使用メモリ 4,352 KB
最終ジャッジ日時 2023-10-11 19:17:35
合計ジャッジ時間 1,946 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 2 ms
4,348 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 1 ms
4,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<functional>
using namespace std;
typedef long long int llint;
#define  pub push_back

//A
//BABA
int main(void){
	llint n,ansa,ansb,ansc,ok=0;
	cin>>n;
	ansa=(n/10000)*(n/10000)*3;
	ansb=(n/10000)*(n%10000)*6;
	ansc=(n%10000)*(n%10000)*3;
	ansb+=ansc/100000000;
	ansc%=100000000;
	ansa+=ansb/100000000;
	ansb%=100000000;
	if(ansa>0){ printf("%lld",ansa);ok=1; }
	if(ok==1){ printf("%04lld",ansb);ok=1; }
	else if(ansb>0){ printf("%lld",ansb);ok=1; }
	if(ok==1){printf("%04lld",ansc);ok=1;}
	else{ printf("%lld",ansc);}
	return 0;
}
0