Result

AC

Duration

841ms

Code [DL]

use std::io::Read;fn main(){let mut b=[0;36];let _=std::io::stdin().read_exact(&mut b);let mut m=[0;12];let mut x=0;for i in 0..12{m[i]=b[i*3]as i32*10+b[i*3+1]as i32-m[i%3];if i>8{x+=m[i]*(m[(i+1)%3+3]*m[(i+2)%3+6]-m[(i+1)%3+6]*m[(i+2)%3+3])}}print!("{}",x/6)}

stdin

86 03 44
82 73 94
88 73 13
04 41 41

stdout

77548

stderr