{"id":"2307e5b9-ebb2-49ca-bac0-66e39fe73c1d","name":"Building Construction","description":"<a href=\"https://www.spoj.com/problems/KOPC12A/\" target=\"_blank\"><i class=\"fa fa-external-link\" aria-hidden=\"true\"> Link -> Building Construction | SPOJ - KOPC12A - K12</i></a>","inputFormat":"Check the link","outputFormat":"Check the link","constraints":"Check the link","sampleCode":{"cpp":{"code":""},"java":{"code":"import java.io.*;\r\nimport java.util.*;\r\n\r\npublic class Main {\r\n public static void main(String[] args) throws Exception\r\n {\r\n //Code Here;\r\n }\r\n}"},"ruby":{"code":""},"python":{"code":""},"javascript":{"code":""}},"points":10,"difficulty":"medium","sampleInput":"1\r\n3\r\n1 2 3\r\n10 100 1000","sampleOutput":"120","questionVideo":"","hints":[],"associated":[],"solutionSeen":false,"tags":[],"meta":{"path":[{"id":0,"name":"home"},{"id":"0c54b191-7b99-4f2c-acb3-e7f2ec748b2a","name":"Data Structures and Algorithms","slug":"data-structures-and-algorithms","type":0},{"id":"ccdbbb91-d392-43f3-8065-0ecd4a077535","name":"Ternary Search For Experts","slug":"ternary-search-for-experts-998","type":0},{"id":"95f88d0d-7ed0-4b3f-b5be-92660831461e","name":"Building Construction","slug":"building-construction","type":1}],"next":{"id":"997b8870-c4ae-41c1-8f82-5bb6dc5ac3cc","name":"Rescuer","type":1,"slug":"rescuer"},"prev":{"id":"404e8d8d-6a24-42bf-8b8f-f673eed4c599","name":"Is This Jee","type":1,"slug":"is-this-jee"}}}

Building Construction

<a href="https://www.spoj.com/problems/KOPC12A/" target="_blank"><i class="fa fa-external-link" aria-hidden="true"> Link -> Building Construction | SPOJ - KOPC12A - K12</i></a>

{"id":"2307e5b9-ebb2-49ca-bac0-66e39fe73c1d","name":"Building Construction","description":"<a href=\"https://www.spoj.com/problems/KOPC12A/\" target=\"_blank\"><i class=\"fa fa-external-link\" aria-hidden=\"true\"> Link -> Building Construction | SPOJ - KOPC12A - K12</i></a>","inputFormat":"Check the link","outputFormat":"Check the link","constraints":"Check the link","sampleCode":{"cpp":{"code":""},"java":{"code":"import java.io.*;\r\nimport java.util.*;\r\n\r\npublic class Main {\r\n public static void main(String[] args) throws Exception\r\n {\r\n //Code Here;\r\n }\r\n}"},"ruby":{"code":""},"python":{"code":""},"javascript":{"code":""}},"points":10,"difficulty":"medium","sampleInput":"1\r\n3\r\n1 2 3\r\n10 100 1000","sampleOutput":"120","questionVideo":"","hints":[],"associated":[],"solutionSeen":false,"tags":[],"meta":{"path":[{"id":0,"name":"home"},{"id":"0c54b191-7b99-4f2c-acb3-e7f2ec748b2a","name":"Data Structures and Algorithms","slug":"data-structures-and-algorithms","type":0},{"id":"ccdbbb91-d392-43f3-8065-0ecd4a077535","name":"Ternary Search For Experts","slug":"ternary-search-for-experts-998","type":0},{"id":"95f88d0d-7ed0-4b3f-b5be-92660831461e","name":"Building Construction","slug":"building-construction","type":1}],"next":{"id":"997b8870-c4ae-41c1-8f82-5bb6dc5ac3cc","name":"Rescuer","type":1,"slug":"rescuer"},"prev":{"id":"404e8d8d-6a24-42bf-8b8f-f673eed4c599","name":"Is This Jee","type":1,"slug":"is-this-jee"}}}
plane

Editor


Loading...

Building Construction

medium

Constraints

Check the link

Format

Input

Check the link

Output

Check the link

Example

Sample Input

1 3 1 2 3 10 100 1000

Sample Output

120

Discussions

Show Discussion

Related Resources

related resources

Turning Off Zen Mode