Created
          December 29, 2019 14:19 
        
      - 
      
- 
        Save dalcon10028/7ea0d6c83e422f5d40338e067d603e3c to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import java.util.*; | |
| public class Main { | |
| public static void main(String[] args) { | |
| Scanner sc = new Scanner(System.in); | |
| int N = sc.nextInt(); | |
| sc.close(); | |
| int count=1; // 몇 번째 숫자인지 세는 변수 | |
| for(int i=666; ;i++){ | |
| String numToString = Integer.toString(i); | |
| if (numToString.contains("666")) { | |
| if (N==count++) { | |
| System.out.println(i); | |
| return; | |
| } | |
| } | |
| } | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment