Submission #1306999
Source Code Expand
rest = 2025 - gets.to_i ans = [] ans << "1 x #{rest}" if rest <= 9 ans << "2 x #{rest / 2}" if rest % 2 == 0 && rest / 2 <= 9 ans << "3 x #{rest / 3}" if rest % 3 == 0 && rest / 3 <= 9 ans << "4 x #{rest / 4}" if rest % 4 == 0 && rest / 4 <= 9 ans << "5 x #{rest / 5}" if rest % 5 == 0 && rest / 5 <= 9 ans << "6 x #{rest / 6}" if rest % 6 == 0 && rest / 6 <= 9 ans << "7 x #{rest / 7}" if rest % 7 == 0 && rest / 7 <= 9 ans << "8 x #{rest / 8}" if rest % 8 == 0 && rest / 8 <= 9 ans << "9 x #{rest / 9}" if rest % 9 == 0 && rest / 9 <= 9 ans.each { |a| puts a }
Submission Info
Submission Time | |
---|---|
Task | C - 九九足し算 |
User | sei0o |
Language | Ruby (2.3.3) |
Score | 100 |
Code Size | 596 Byte |
Status | AC |
Exec Time | 7 ms |
Memory | 1788 KB |
Judge Result
Set Name | All | ||
---|---|---|---|
Score / Max Score | 100 / 100 | ||
Status |
|
Set Name | Test Cases |
---|---|
All | sample_01.txt, sample_02.txt, test_1953.txt, test_1971.txt, test_1977.txt, test_1983.txt, test_1989.txt, test_1990.txt, test_1993.txt, test_1995.txt, test_1997.txt, test_1998.txt, test_2001.txt, test_2009.txt, test_2013.txt, test_2017.txt, test_2019.txt, test_2020.txt, test_2022.txt, test_2024.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_01.txt | AC | 7 ms | 1788 KB |
sample_02.txt | AC | 7 ms | 1788 KB |
test_1953.txt | AC | 7 ms | 1788 KB |
test_1971.txt | AC | 7 ms | 1788 KB |
test_1977.txt | AC | 7 ms | 1788 KB |
test_1983.txt | AC | 7 ms | 1788 KB |
test_1989.txt | AC | 7 ms | 1788 KB |
test_1990.txt | AC | 7 ms | 1788 KB |
test_1993.txt | AC | 7 ms | 1788 KB |
test_1995.txt | AC | 7 ms | 1788 KB |
test_1997.txt | AC | 7 ms | 1788 KB |
test_1998.txt | AC | 7 ms | 1788 KB |
test_2001.txt | AC | 7 ms | 1788 KB |
test_2009.txt | AC | 7 ms | 1788 KB |
test_2013.txt | AC | 7 ms | 1788 KB |
test_2017.txt | AC | 7 ms | 1788 KB |
test_2019.txt | AC | 7 ms | 1788 KB |
test_2020.txt | AC | 7 ms | 1788 KB |
test_2022.txt | AC | 7 ms | 1788 KB |
test_2024.txt | AC | 7 ms | 1788 KB |