1 solutions

  • 0
    @ 2025-11-5 20:14:53

    C++ :

    #include <iostream>
    using namespace std;
    int main(){
    	for(int n;cin>>n;)
    		if(n%4==0)
    			cout<<"loss"<<endl;
    		else
    			cout<<n%4<<endl;
    	return 0;
    }
    
    

    Java :

    import java.util.*;
    public class Main {
    	public static void main(String[] args) {
          Scanner in =new Scanner(System.in);
    		int n=0;
    		while(in.hasNext()) {
    			n=in.nextInt();
    			if(n%4!=0){
    				System.out.println(n%4);
    			}else
    			{
    				System.out.println("loss");
    			}
    		}
    	}
    
    }
    
    
    • 1

    Information

    ID
    20179
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By