Submission #155359
Source Code Expand
object Main{ def main(args:Array[String]){ val n=readLine.toInt def f(a0:Int, a1:Int, a2:Int, i:Int, n:Int){ if(i==n) { a2 }else{ f(a1,a2,(a0+a1+a2)%10007, i+1, n) } } if(n<=2) println(0) else println(f(0,0,1,3,n)) }}
Submission Info
Submission Time | |
---|---|
Task | B - トリボナッチ数列 |
User | ixxa |
Language | Scala (2.9.1) |
Score | 0 |
Code Size | 264 Byte |
Status | WA |
Exec Time | 1123 ms |
Memory | 42060 KB |
Judge Result
Set Name | All | ||||
---|---|---|---|---|---|
Score / Max Score | 0 / 100 | ||||
Status |
|
Set Name | Test Cases |
---|---|
All | test_1.txt, test_1000000.txt, test_1002.txt, test_104.txt, test_107843.txt, test_10980.txt, test_1212.txt, test_1238.txt, test_13194.txt, test_14.txt, test_16.txt, test_2.txt, test_210782.txt, test_21694.txt, test_243.txt, test_24916.txt, test_278.txt, test_3.txt, test_31.txt, test_32.txt, test_42.txt, test_5555.txt, test_567914.txt, test_61868.txt, test_765671.txt, test_8195.txt, test_8353.txt, test_9.txt, test_9625.txt, test_97.txt, test_998.txt, test_999998.txt, test_999999.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_01.txt | WA | 1110 ms | 42060 KB |
sample_02.txt | AC | 1054 ms | 41976 KB |
sample_03.txt | WA | 1122 ms | 41944 KB |
test_1.txt | AC | 1074 ms | 41980 KB |
test_1000000.txt | WA | 1057 ms | 41908 KB |
test_1002.txt | WA | 1056 ms | 41952 KB |
test_104.txt | WA | 1066 ms | 41912 KB |
test_107843.txt | WA | 1073 ms | 41944 KB |
test_10980.txt | WA | 1089 ms | 41852 KB |
test_1212.txt | WA | 1061 ms | 42052 KB |
test_1238.txt | WA | 1066 ms | 41936 KB |
test_13194.txt | WA | 1044 ms | 41852 KB |
test_14.txt | WA | 1074 ms | 41984 KB |
test_16.txt | WA | 1060 ms | 41984 KB |
test_2.txt | AC | 1088 ms | 41928 KB |
test_210782.txt | WA | 1074 ms | 41980 KB |
test_21694.txt | WA | 1068 ms | 41976 KB |
test_243.txt | WA | 1094 ms | 41948 KB |
test_24916.txt | WA | 1048 ms | 41856 KB |
test_278.txt | WA | 1100 ms | 41864 KB |
test_3.txt | WA | 1071 ms | 41980 KB |
test_31.txt | WA | 1123 ms | 41996 KB |
test_32.txt | WA | 1082 ms | 41836 KB |
test_42.txt | WA | 1076 ms | 41996 KB |
test_5555.txt | WA | 1087 ms | 41876 KB |
test_567914.txt | WA | 1085 ms | 41952 KB |
test_61868.txt | WA | 1068 ms | 41984 KB |
test_765671.txt | WA | 1085 ms | 41988 KB |
test_8195.txt | WA | 1066 ms | 41984 KB |
test_8353.txt | WA | 1100 ms | 41956 KB |
test_9.txt | WA | 1071 ms | 41984 KB |
test_9625.txt | WA | 1080 ms | 41976 KB |
test_97.txt | WA | 1077 ms | 41988 KB |
test_998.txt | WA | 1075 ms | 41936 KB |
test_999998.txt | WA | 1101 ms | 41824 KB |
test_999999.txt | WA | 1089 ms | 41848 KB |