Please sign in first.
Submission #313663
Source Code Expand
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
int n,m;
int[] plade;
public static void main(String[] args){
new Main().ans();
}
private void ans() {
Scanner sc = new Scanner(System.in);
n = sc.nextInt();
String s = Integer.toBinaryString(n);
for(int i =0 ; i<s.length()/2;i++){
if(s.charAt(i)!=s.charAt(s.length()-1 -i)){
System.out.println("No"); System.exit(0);
}
}
System.out.println("Yes");
}
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - 2015 |
| User | tamtam |
| Language | Java (OpenJDK 1.7.0) |
| Score | 2 |
| Code Size | 484 Byte |
| Status | AC |
| Exec Time | 346 ms |
| Memory | 23036 KiB |
Judge Result
| Set Name | All | ||
|---|---|---|---|
| Score / Max Score | 2 / 2 | ||
| Status |
|
| Set Name | Test Cases |
|---|---|
| All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, 016.txt, 017.txt, 018.txt, 019.txt, 020.txt, 021.txt, 022.txt, 023.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 000.txt | AC | 339 ms | 23036 KiB |
| 001.txt | AC | 338 ms | 22860 KiB |
| 002.txt | AC | 344 ms | 22820 KiB |
| 003.txt | AC | 342 ms | 22856 KiB |
| 004.txt | AC | 337 ms | 22956 KiB |
| 005.txt | AC | 337 ms | 23008 KiB |
| 006.txt | AC | 333 ms | 22880 KiB |
| 007.txt | AC | 338 ms | 22892 KiB |
| 008.txt | AC | 346 ms | 22928 KiB |
| 009.txt | AC | 342 ms | 22848 KiB |
| 010.txt | AC | 345 ms | 22964 KiB |
| 011.txt | AC | 340 ms | 22948 KiB |
| 012.txt | AC | 343 ms | 22884 KiB |
| 013.txt | AC | 343 ms | 22884 KiB |
| 014.txt | AC | 340 ms | 22860 KiB |
| 015.txt | AC | 337 ms | 22828 KiB |
| 016.txt | AC | 335 ms | 22884 KiB |
| 017.txt | AC | 340 ms | 22832 KiB |
| 018.txt | AC | 335 ms | 22860 KiB |
| 019.txt | AC | 339 ms | 22900 KiB |
| 020.txt | AC | 337 ms | 22872 KiB |
| 021.txt | AC | 339 ms | 22928 KiB |
| 022.txt | AC | 338 ms | 22872 KiB |
| 023.txt | AC | 345 ms | 22924 KiB |