Submission #1695127


Source Code Expand

use std::io;
use std::str::FromStr;

fn main() {
    let stdin = io::stdin();
    let mut buf = String::new();
    stdin.read_line(&mut buf).ok();

    let mut it = buf.split_whitespace().map(|n| i64::from_str(n).unwrap());
    let (a, b) = (it.next().unwrap(), it.next().unwrap());

    if a % 3 == 0 {
        println!("Possible");
        return;
    }
    if b % 3 == 0 {
        println!("Possible");
        return;
    }
    if (a + b) % 3 == 0 {
        println!("Possible");
        return;
    }
    println!("Impossible");

}

Submission Info

Submission Time
Task A - Sharing Cookies
User nak3
Language C++14 (GCC 5.4.1)
Score 0
Code Size 563 Byte
Status CE

Compile Error

./Main.cpp:1:1: error: ‘use’ does not name a type
 use std::io;
 ^
./Main.cpp:2:1: error: ‘use’ does not name a type
 use std::str::FromStr;
 ^
./Main.cpp:4:1: error: ‘fn’ does not name a type
 fn main() {
 ^