結果

問題 No.314 ケンケンパ
ユーザー LeonardoneLeonardone
提出日時 2015-12-08 09:53:16
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 90 ms / 1,000 ms
コード長 220 bytes
コンパイル時間 145 ms
コンパイル使用メモリ 5,328 KB
実行使用メモリ 13,748 KB
最終ジャッジ日時 2023-10-12 21:32:14
合計ジャッジ時間 1,728 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
11,548 KB
testcase_01 AC 19 ms
11,608 KB
testcase_02 AC 18 ms
11,616 KB
testcase_03 AC 17 ms
11,588 KB
testcase_04 AC 17 ms
11,628 KB
testcase_05 AC 18 ms
11,660 KB
testcase_06 AC 18 ms
13,724 KB
testcase_07 AC 18 ms
13,748 KB
testcase_08 AC 18 ms
11,632 KB
testcase_09 AC 18 ms
11,560 KB
testcase_10 AC 18 ms
11,748 KB
testcase_11 AC 17 ms
11,560 KB
testcase_12 AC 18 ms
11,604 KB
testcase_13 AC 17 ms
11,636 KB
testcase_14 AC 18 ms
13,560 KB
testcase_15 AC 18 ms
11,752 KB
testcase_16 AC 20 ms
11,676 KB
testcase_17 AC 26 ms
11,628 KB
testcase_18 AC 53 ms
11,588 KB
testcase_19 AC 90 ms
11,756 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(define n (read))

(define (f a b c n)
	(if (= n 0)
		(remainder (+ a b c) 1000000007)
		(f (remainder (+ b c) 1000000007) a b (- n 1))))

(define r (number->string (f 0 1 0 (- n 1))))

(print (car (string-split r ".")))
0