結果

問題 No.493 とても長い数列と文字列(Long Long Sequence and a String)
ユーザー e869120e869120
提出日時 2017-03-08 20:37:17
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
MLE  
実行時間 -
コード長 365 bytes
コンパイル時間 572 ms
コンパイル使用メモリ 68,056 KB
実行使用メモリ 814,436 KB
最終ジャッジ日時 2023-09-06 00:26:02
合計ジャッジ時間 4,480 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,384 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 1 ms
4,380 KB
testcase_07 AC 3 ms
5,536 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 7 ms
5,696 KB
testcase_10 AC 4 ms
5,468 KB
testcase_11 AC 6 ms
5,504 KB
testcase_12 AC 8 ms
5,512 KB
testcase_13 AC 7 ms
5,468 KB
testcase_14 AC 5 ms
5,488 KB
testcase_15 AC 6 ms
5,536 KB
testcase_16 AC 4 ms
5,428 KB
testcase_17 AC 6 ms
5,408 KB
testcase_18 AC 5 ms
5,700 KB
testcase_19 AC 4 ms
5,592 KB
testcase_20 AC 4 ms
5,532 KB
testcase_21 AC 5 ms
5,700 KB
testcase_22 AC 7 ms
5,412 KB
testcase_23 AC 4 ms
5,488 KB
testcase_24 AC 5 ms
5,468 KB
testcase_25 AC 5 ms
5,532 KB
testcase_26 AC 5 ms
5,420 KB
testcase_27 AC 8 ms
5,436 KB
testcase_28 AC 8 ms
5,412 KB
testcase_29 AC 4 ms
5,700 KB
testcase_30 AC 4 ms
5,464 KB
testcase_31 AC 8 ms
5,532 KB
testcase_32 AC 4 ms
5,464 KB
testcase_33 AC 9 ms
5,464 KB
testcase_34 AC 3 ms
5,532 KB
testcase_35 AC 7 ms
5,456 KB
testcase_36 AC 4 ms
5,484 KB
testcase_37 AC 4 ms
5,472 KB
testcase_38 AC 5 ms
5,532 KB
testcase_39 AC 3 ms
5,516 KB
testcase_40 AC 5 ms
5,528 KB
testcase_41 AC 3 ms
5,440 KB
testcase_42 AC 4 ms
5,640 KB
testcase_43 AC 6 ms
5,504 KB
testcase_44 AC 4 ms
5,420 KB
testcase_45 AC 4 ms
5,468 KB
testcase_46 AC 5 ms
5,420 KB
testcase_47 AC 7 ms
5,512 KB
testcase_48 AC 4 ms
5,456 KB
testcase_49 AC 4 ms
5,468 KB
testcase_50 AC 6 ms
5,548 KB
testcase_51 AC 5 ms
5,508 KB
testcase_52 AC 3 ms
5,468 KB
testcase_53 AC 7 ms
5,468 KB
testcase_54 AC 3 ms
5,420 KB
testcase_55 AC 4 ms
5,472 KB
testcase_56 AC 8 ms
5,416 KB
testcase_57 AC 6 ms
5,464 KB
testcase_58 AC 6 ms
5,548 KB
testcase_59 MLE -
testcase_60 -- -
testcase_61 -- -
testcase_62 -- -
testcase_63 -- -
testcase_64 -- -
testcase_65 -- -
testcase_66 -- -
testcase_67 -- -
testcase_68 -- -
testcase_69 -- -
testcase_70 -- -
testcase_71 -- -
testcase_72 -- -
testcase_73 -- -
testcase_74 -- -
testcase_75 -- -
testcase_76 -- -
testcase_77 -- -
testcase_78 -- -
testcase_79 -- -
testcase_80 -- -
testcase_81 -- -
testcase_82 -- -
testcase_83 -- -
testcase_84 -- -
testcase_85 -- -
testcase_86 -- -
testcase_87 -- -
testcase_88 -- -
testcase_89 -- -
testcase_90 -- -
testcase_91 -- -
testcase_92 -- -
testcase_93 -- -
testcase_94 -- -
testcase_95 -- -
testcase_96 -- -
testcase_97 -- -
testcase_98 -- -
testcase_99 -- -
testcase_100 -- -
testcase_101 -- -
testcase_102 -- -
testcase_103 -- -
testcase_104 -- -
testcase_105 -- -
testcase_106 -- -
testcase_107 -- -
testcase_108 -- -
testcase_109 -- -
testcase_110 -- -
testcase_111 -- -
testcase_112 -- -
testcase_113 -- -
testcase_114 -- -
testcase_115 -- -
testcase_116 -- -
testcase_117 -- -
testcase_118 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
using namespace std;
int main(){
	long long K,L,R;cin>>K>>L>>R;
	string S="";
	for(int i=1;i<=K;i++){S=S+to_string(i*i)+S;}
	if(S.size()<R){cout<<"-1"<<endl;}
	else{
		long long r1=0,r2=1;
		for(int i=L-1;i<=R-1;i++){
			int G=(S[i]-'0');if(G==0)G=10;
			r1+=G;r2*=G;r2%=1000000007;
		}
		cout<<r1<<' '<<r2<<endl;
	}
	return 0;
}
0