Language: C++

#![allow(unused_imports)]
#![allow(non_snake_case)]
#![allow(unused_mut)]
#![allow(dead_code)]
#![allow(unused_variables)]

use std::collections::HashSet;
use std::collections::HashMap;
use std::collections::BTreeSet;
use std::collections::VecDeque;
use std::cmp::{max, min};
use std::mem::swap;
use std::io::prelude::*; // input()

fn input<T>() -> T
    where T: std::str::FromStr {
    let stdin = std::io::stdin();
    let token: String = stdin
        .lock()
        .bytes()
        .map(|c| c.unwrap() as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().unwrap()
}
fn main() {
    let n = input::<usize>();
    let m = input::<usize>();
    let abc = (0..n)
        .map(|_| (input::<usize>()-1,input::<usize>()-1,input::<usize>()))
        .collect::<Vec<_>>();

    let mut d = vec![vec![usize::max_value(); 100]; 100];
    for i in 0..n {
        d[i][i] = 0;
    }

    for &(a, b, c) in &abc {
        d[a][b] = min(d[a][b], c);
        d[b][a] = min(d[b][a], c);
    }

    for i in 0..n {
        for j in 0..n {
            for k in 0..n {
                d[i][j] = min(d[i][j], d[i][k] + d[k][j]);
            }
        }
    }

    let mut ans = m;

    for &(a, b, c) in &abc {
        let shortest = || {
            for j in 0..n {
                if d[j][a] + c == d[j][b]  {
                   return true; 
                }
            }
            false 
        };
        if shortest() {
            ans-=1;
        }
    }
    println!("{}", ans);
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #![allow(unused_imports)]
      |  ^
a.cc:2:2: error: invalid preprocessing directive #!
    2 | #![allow(non_snake_case)]
      |  ^
a.cc:3:2: error: invalid preprocessing directive #!
    3 | #![allow(unused_mut)]
      |  ^
a.cc:4:2: error: invalid preprocessing directive #!
    4 | #![allow(dead_code)]
      |  ^
a.cc:5:2: error: invalid preprocessing directive #!
    5 | #![allow(unused_variables)]
      |  ^
a.cc:30:16: error: too many decimal points in number
   30 |     let abc = (0..n)
      |                ^~~~
a.cc:35:14: error: too many decimal points in number
   35 |     for i in 0..n {
      |              ^~~~
a.cc:44:14: error: too many decimal points in number
   44 |     for i in 0..n {
      |              ^~~~
a.cc:45:18: error: too many decimal points in number
   45 |         for j in 0..n {
      |                  ^~~~
a.cc:46:22: error: too many decimal points in number
   46 |             for k in 0..n {
      |                      ^~~~
a.cc:56:22: error: too many decimal points in number
   56 |             for j in 0..n {
      |                      ^~~~
a.cc:7:1: error: 'use' does not name a type
    7 | use std::collections::HashSet;
      | ^~~
a.cc:8:1: error: 'use' does not name a type
    8 | use std::collections::HashMap;
      | ^~~
a.cc:9:1: error: 'use' does not name a type
    9 | use std::collections::BTreeSet;
      | ^~~
a.cc:10:1: error: 'use' does not name a type
   10 | use std::collections::VecDeque;
      | ^~~
a.cc:11:1: error: 'use' does not name a type
   11 | use std::cmp::{max, min};
      | ^~~
a.cc:12:1: error: 'use' does not name a type
   12 | use std::mem::swap;
      | ^~~
a.cc:13:1: error: 'use' does not name a type
   13 | use std::io::prelude::*; // input()
      | ^~~
a.cc:15:1: error: 'fn' does not name a type
   15 | fn input<T>() -> T
      | ^~
a.cc:27:1: error: 'fn' does not name a type
   27 | fn main() {
      | ^~